Releases: PolyPlugins/Settings-Class-for-Wordpress
3.1.0
3.0.0
Breaking Changes
Generation of settings_name in v2.0.0 was using namespacing as part of the generation, but this included full paths, so it made the settings_name long. Settings name can now be configured manually, but will fallback to plugin_name_settings as the generation no longer handles namespaces. If you use v2.0.0 you will need to migrate your plugin's config to pass your setting name. The default is fine for non published plugins, but for published plugins you should include your company/name to prevent conflicts such as test_plugin_settings_polyplugins instead of the default test_plugin_settings. We are also working on a new boilerplate which includes an Admin class that handles generation of your plugin settings so you can just drop in the admin class and not worry about having to define this for each plugin. The boilerplate is also going to have a Utils class which will have a static method for getting options to make it easier to fetch options outside the Settings class.
Changelog
- Added: Subsections
- Added: Templating
- Added: Ability to add your own settings_name in config.
- Added: Additional 'note' attribute to sections to have a note appear at the top of the section
- Added: Additional 'description' attribute to fields
- Added: Separators between fields
- Added: Ability to add action links and meta links with config
- Added: Sidebar
- Added: Sidebar config
- Added: Recharge template
- Updated: Positioning of save button and credit
- Updated: Default template to have the fields below the name as having the label next to the fields took up too much space
- Updated: Bootstrap
- Bugfix: Settings name generation
- Removed: Excess properties that were really only required for checking if Reusable Admin Panel was activated, but since this class is just included in all plugins, those properties are no longer needed. This makes instantiating the class shorter with less defining of properties.
- Removed: Reusable Admin Panel checks
- Reworked: Auto settings_name generation.
2.0.0
Breaking Changes
This version contains breaking changes from previous versions. We aimed to preserve full backward compatibility, but doing so would have added unnecessary complexity and made the codebase harder to maintain. Instead, we’re limiting potential breaking changes to major releases only. This update simplifies the foundation and makes it possible to support features like sub-fields within sub-tabs in the future. You will need to migrate your plugins to this version manually and test for compatibility. The main change is adding icons to navigation tabs. You'll need to update your fields property to account for this. For example:
$this->fields = array(
'general' => array(
array(
'name' => __('Enabled', $this->plugin_slug),
'type' => 'switch',
'default' => false,
),
You would need to move your options under the fields key like this:
$this->fields = array(
'general' => array(
'icon' => 'gear-fill',
'fields' => array(
array(
'name' => __('Enabled', $this->plugin_slug),
'type' => 'switch',
'default' => false,
),
You can also exclude the 'icon' key if you don't want to use icons, but if you want to use icons you can pull it from Bootstrap Icons.
Installation
The easiest way to install Settings Class for WordPress is via composer within your /wp-content/plugins/test-plugin/ directory:
composer require polyplugins/settings-class-for-wordpress
See readme for more information on installation.
Changelog
- Added: Composer
- Added: Ability to use icons in tab navigator
- Added: Bootstrap Icons
- Added: All the features from latest Reusable Admin Panel so code base is current
- Bugfix: Dropdown select preventing load
- Removed: Font Awesome Icons
1.1.0
Added: Default value arg handling
Added: Required arg handling
Added: Validation
Added: Admin menu handling
Added: Url and Email fields
Bugfix: Column size fix
Bugfix: Protected functions should have been private
Removed: Unused properties
1.0.0
Enhancement: Complete Redesign
Enhancement: Anchor navigation
Added: Helper sidebar
Added: Dropdown Handling
Added: Date Handling
Added: Time Handling
Updated: Bootstrap
Deprecated: Toasts