Release Date: Jun 22, 2024
- Option
action_links
accepts single array with keyshref
andtext
.
Release Date: Apr 8, 2024
slug
defaults to plugin headerTextDomain
.path()
runswp_normalize_path
on file path and relative path.
Release Date: Feb 22, 2024
- Check if constants are defined before defining constants.
Release Date: Jan 22, 2024
- Public method
version()
returns plugin version from plugin header.
- Getter method
path()
accepts optional relative path parameter. Does not affect setter functionality. - Getter method
url()
accepts optional relative path parameter. Does not affect setter functionality.
Release Date: Oct 3, 2023
- Support Plugin Update Checker v5 as well as v4. Create class alias
WPHelper\PucFactory
forYahnisElsts\PluginUpdateChecker\v5\PucFactory
if available. Fallback toPuc_v4_Factory
.
Release Date: Jun 9, 2023
- Fix passing PluginCore instance to AdminPage constructor in
admin_page()
method.
Release Date: Feb 3, 2023
- Property
token
and methodtoken
. Lowercase underscore token to be used as variable name.
Release Date: Jan 13, 2023
- Static
get_by_file
method. Get PluginCore instance by plugin filename.
Release Date: Aug 8, 2022
- Minor fixes.
Release Date: Aug 8, 2022
- Remove all dependencies. No require.
Release Date: Aug 5, 2022
- Add
action_links
option. Accepts standardplugin_action_links_
callback filter function. Alternatively accepts array of links. links can be HTML tag strings ('<a href="/link">Link</a>'
) or arrays with keyshref
andtext
. Special use case'href' => 'menu_page'
available for quick Settings link generation.
- Plugin updater - prefer plugin header
Update URI
for plugin update checker, if no URI provided in options. - Validate class
WPHelper\AdminPage
exists - required foradmin_page
option/settings. - Significant code cleanup, notes, doc blocks and reorganizing of PluginCore class.
Release Date: Jul 29, 2022
- Update
composer.json
dependencies -abuyoyo/adminmenupage ~0.20
.
Release Date: Jul 27, 2022
- Update
composer.json
dependencies. - Require PHP >= 7.4
Release Date: May 22, 2022
- Class
PluginCore
is pluggable. - Prevent direct PHP script execution if not accessed within the WordPress environment.
- Include
plugin.php
if functionget_plugin_data
does not exist. This could case critical failure.
Release Date: Feb 7, 2021
- Pass instance of
PluginCore
toAdminPage
if current version supports it (used in Plugin Info Metabox generation).
- Upgrade callback
upgrade_cb
will execute when only single plugin is updated.
- Use
new WPHelper\AdminPage()
(WPHelper\AdminMenuPage >= 0.12) instead of deprecatedAdminMenuPage
. - Do not hook
Puc_v4_Factory::buildUpdateChecker
onadmin_init
. Run in plugin's global scope.
- Add
admin_page
option to create a WPHelper\AdminMenuPage instance. - Add
plugin_data
variable with WordPress coreget_plugin_data()
object. Use header data if no slug or title provided.
- Fix PHP defines when
const
not provided.
- Fix
upgrade_cb
function handling.
- Fix
upgrade_cb_wrapper
function.
- Update
composer.json
version.
- Fix
upgrade_cb_wrapper
function.
- Add upgrade_cb wrapper function that conducts sanity-checks before calling
upgrade_cb
callback provided. - Add
plugin_basename()
getter/setter function andplugin_basename
variable. - Add changelog.
- Add
upgrade_cb
option - callable function to run on WordPressupgrader_process_complete
hook.
- Fix undefined index PHP notices introduced in version 0.9
- Add automatic plugin update checker using
yahnis-elsts/plugin-update-checker
library.
- Fix wrong
plugin_basename
constant.
- Don't use
extract
in constructor - Add sanity checks and normalize getter/setter functions
- Add
file()
getter function.
- Add
path()
,url()
getter/setter functions. - Add
name()
getter function.
- Initial release.
- Defines
PLUGINNAME_URL
,_PATH
,_DIR
,_BASENAME
,_FILE
constants for plugin. - Registers plugin activation, deactivation and uninstall hook if callbacks provided.
- Static function
PluginCore::get($slug)
will return instance of PluginCore registered with$slug
. Thus PluginCore can be initiated without polluting global scope.