All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Require PHP >= 8.1
- Update admin CSS with a slight design change.
- Allow int values in Script/Style models version property.
- Prepare tests for PHP 8.3, and ready code for PHP 8.0 deprecation.
- Update wp-color-picker-alpha to v3.0.3.
- Add new Text Array field type.
- Update roots/wordpress requirement from ~6.1.1 to ~6.2.2.
- Update wp-phpunit/wp-phpunit requirement from ~6.1.1 to ~6.2.0.
- Update slevomat/coding-standard requirement from ~7.2 to ~8.12
- A little code + dependencies + Action cleanup (#73).
- PHP 8.0 enhancements (#74)
- New Repeater Field Type (WIP) - Part I
- PHP 8.1 compat: Don't pass null values to wp_editor or wp_kses_post (#77)
- Bump word-wrap from 1.2.3 to 1.2.4 (#76)
- Resolve issue with new instance objects and defined type (edge case) in datetimelocal field.
- Allow dashed id's in field types, and sanitize the type on getter.
- Add new date fields.
- Set minimum PHP version to 8.0.
- Add mew
WpSettingsApi::HOOK_INIT_SLUG__S
action hook, which would allow hooks only on currentgetPluginInfo()->getMenuSlug()
. - Change passed param in
do_action
forActionHookName::SETTINGS_SETTINGS_SIDEBARS
from an array to aWpSettingsApi
instance. #48 - Add
isCurrentMenuSlug($slug)
to allow for easy boolean condition checks.
- Lock WP Utilities to version
^2.8
. - Fix: Allow multiple settings instances by not removing current action hook. (Fixes #13)
- Add new Alpha Color Picker field type.
- Update
SettingField
andSettingSection
to extend theBaseModel
class. - Add new
ActionHookName
interface for easier hook calling. - Cleanup Options code (formatting PSR12), use import functions, and update docblock(s).
- Update views to utilize new interface constants for repeatable action hook name(s) defined in the Interface.
- In FieldTypes::getFieldDescription(); don't escape HTML, but pass it through
wp_kses_post
which will "Sanitizes content for allowed HTML tags".
- Require PHP ^7.4.
- Update composer dev-dependencies.
- Build PHP 8.0 with Travis.
- Incorrect version passed to the new JS Delivr CDN.
- Add new filter to allow for local assets.
- Use
WpSettingsApi::FILTER_PREFIX . 'use_local_scripts'
, to return a boolean value. - Assets for admin settings will now be loaded from the jsdelivr CDN (if local assets is false).
- Use
- Add field type:
multiselect
, useDwnload\WpSettingsApi\Settings\FieldTypes::FIELD_TYPE_MULTISELECT
. - Add missing "attributes" constant:
Dwnload\WpSettingsApi\Settings\FieldTypes\SettingField::ATTRIBUTES
. - Update composer development dependencies.
- Fix: JQMIGRATE: jQuery.fn.blur() event shorthand is deprecated #23.
- Add suggestion for
frontpack/composer-assets-plugin
.
- Version bump since composer didn't pick up 3.2.1.
- Fix JS not loading for the new color picker.
- Add support for WordPress 5.4+
- Fixed media element uploads for WordPress 5.5.
- Add
color
as a field type. - Remove inline JS for old WpMediaUpload element.
- Require PHP >= 7.3
WpSettingsApi::addHooks()
requires:void
return type inwp-utilities:^2
- Breaking rewrite which allows the use of multiple instances in one application.
- Requires PHP >= 7.1
- See Example.php for update on how to use version 3.
thefrosty/wp-utilities
to version 1.4.1.- SettingsApiFactory method
createApp
is nowcreate
which returns a new instance of thePluginSettings
. Use like:new WpSettingsApi(SettingsApiFactory::create([]))
.
AbstractApp()
,App()
&PluginInfo()
.
- On the init action hook, a third parameter has been added to the context of the current WpSettingsApi instance. It's also been moved into the base object since the App class was removed.
- Update: Settings navigation sections now hook into the
App::ACTION_PREFIX . 'settings_sidebars'
action tag. The openingul
tag is hooked in to priority0
and the closingul
is on199
. Each section menu item is hooked into a priority starting at3
and incrementing in value by +2. - Update: admin.css; fixing the removed
th
width attribute in 2.5.0. - Update: admin.js; target sidebar anchor elements with the
[data-tab-id]
only. - Added: Version constant to the base file and passed to the settings page anchor title.
- Update: Move wp_add_inline_script into private helper method.
- Update: add missing field types defined in constants
html
&image
. - Update: FileTypes
file
&image
now proper re-use the WordPress media uploader. - Update:
Script()
with newScript::INLINE_SCRIPT
constant to register date to pass towp_add_inline_script
(defaults to bottom). - Added: new
wp-media-uploader.js
for thefile
&image
field uploads. - Removed:
color
field (missing) (to be added back later?). - Removed:
field-types.js
.
- Add new setAttributes to the SettingField class.
- SettingField() methods now return the object instance (allowing chaining).
- SettingSection() methods now return the object instance (allowing chaining).
- Added
.gitattributes
. #8
- Add missing URL field type.
- Add EMAIL field type.
- PHP 7.2 fix. Changes the order of the fields callback condition on the class object for
add_settings_field
.
- Force return array type.
- Cleaned up composer.json to optimize autoloader and sort packages.
- Removed extra ruleset.xml file.
- Updated: FieldTypes with constants for the respected types.
- PHPCS code standards updates.
- Updated the thefrosty/wp-utilites to version ~1.2.
- Refactor code to new wp-utilities standards.
- Update to PSR2 code.
- Added:
AppFactory
class. - Updated: Added
SectionManager
DI of theApp
instance. Allows for multiple instances to be created by multiple plugins. Please update your instantiation using the newAppFactory
and remove the$app
from( new Init() )->add( $app )
as it's bootstrapped fromWpSettingsApi
now. See Example.php
- Set Options::getOptions
$section_id
default tonull
.
- Return type of Options::getOptions is now 'mixed' as opposed to a strict array.
- Class name follows folder structure with lowercase 'p'.
- Autoloading of files has been updated to reflect the filename and class change.
- Make sure str_repeat's second parameter is always a non-negative integer.
- PHPdocs updates to the FieldManager object.
- Both Api\Style & Api\Script were not using the fully qualified BaseModel class.
- call_user_func passes three params instead of an array of three params.
- Auto add sanitize for obfuscated setting in the callback stack.
- New obfuscated setting type to the FieldTypes object and Options class.
- Add second & third parameter to sanitize callback function in WPSettingsApi.
- New Sanitize class.
- Removed BaseModel in favor of class existing in thefrosty/wp-utilites.
- Cleaned up view/setting-html. Use registered admin page title and add correct link to github package.
- Incorrect call to method in WPSettingsApi to App class..
- menu slug, menu title and page title to App attributes array.
- Call to non static method when using new App injection in WPSettingsApi.
- Forked plugin into wrapper package.
- Example plugin with correct functionality on how to use.
- View.php so unix recognizes directory structure change.
- Update
views
directory to uppercase for correct PSR-4 autoload.
- Forked base settings wrapper from Beachbody LIVE BAU.
- README explaining the purpose and use of the project
- Tests to verify adequate functionality
- This CHANGELOG file