WPHelper\AdminMenuPage
Release date: Oct 17 2024
- Default template uses
load_template()
args.
Release date: Oct 12 2024
- Test method
Metabox::add()
usingis_callable
instead ofmethod_exists
.
- Compatible with lib: WPHelper\Metabox (
abuyoyo/metabox
) ~0.9.
Release date: Sep 14 2024
- Accept option
display_cb
(CMB2 style) as alias ofrender_cb
. - CMB2 option page falls back to option
render_cb
if CMB2 settingdisplay_cb
not provided. - Un-deprecate
render_cb
andrender_tpl
options (deprecated since 0.31).
- Fix nav-tab duplication on non-CMB2 pages when multiple non-CMB2 pages are added to the same tab_group.
- Use
load_template()
with$args
parameter instead ofinclude
where appropriate. - Deprecate
AdminMenuPage
- add_doing_it_wrong
message to constructor.
Release date: Sep 7 2024
- WPHelper debug info is a separate meta-box.
- Add
abuyoyo\screen-meta-links
to WPHelper debug meta-box.
Release date: Sep 5 2024
- CMB2 option pages also use
do_meta_boxes
template.
- No longer use action
wphelper/adminpage/plugin_info_box/$slug
to render plugin info-box.
Release date: Jun 30 2024
- Custom headers
Release Date
/Last Update
acceptd-m-Y
date format.
Release date: Jun 22 2024
- Use h1 tag for title on CMB2 pages.
- Fix internal call to deprecated method.
Release date: May 14 2024
- Fix fatal error when
render
option is an array that is not Callable. - Fix default template sometimes appearing in nested
.wrap
elements.
- Option
parent
accepts slug shortcuts for all WordPress core top menus (dashboard
,users
, etc.) - Custom headers
Release Date
/Last Update
accept multiple date formats. - CMB2 option pages accept mixed CMB2/section-based settings.
- New method
PluginInfoMetaBox::render()
deprecatesPluginInfoMetaBox::plugin_info_box()
.
Release date: Feb 22 2024
- Fix fatal error
Class "WPHelper\MetaBox" not found
. Note: WPHelper\MetaBox is an explicitly required dependency since 0.29, but is implicitly required since 0.25.
Release date: Feb 16 2024
- Add
.wphelper-admin-page
classes to HTML body tag. - Add
.wph-wrap
classes to.wrap
element.
- Remove
.meta-box-sortables
wrapper from main content on CMB2 sidebar templates using#poststuff
element hijacked from Edit Post page.
- Rename methods to the WordPress action handle they are hooked on:
bootstrap()
=>init()
_bootstrap_admin_page()
=>admin_init()
_admin_page_setup()
=>load_page()
- WPH_Debug - add location of WPHelper\Utility functions directory.
- Option
render
render type strings (callback, template or presets) are more descriptive and precise. Used in.wphelper-admin-page-{$render}
body class.
Release date: Feb 14 2024
- Fix plugin info box not appearing on CMB2 pages after last release.
Release date: Feb 14 2024
- Add
.wp-header-end
hr element to all templates. - Restore default h2 styling to forms inside
#poststuff
element. - Remove
.meta-box-sortables
wrapper from main content on sidebar templates using#poststuff
element hijacked from Edit Post page.
- Add
_deprecated_argument
message torender_cb
andrender_tpl
options. - Only run
add_plugin_info_meta_box()
ifplugin_info
option is truthy.
Release date: Oct 5 2023
composer.json
- Requireabuyoyo/metabox
. WPHelper\Metabox has been a required library since 0.25.
- lib: WPHelper\Metabox (
abuyoyo/metabox
) ~0.8.
Release date: Oct 4 2023
- Option
parent
acceptstools
as shorthand fortools.php
. - Add link to Install Plugin page in "CMB2 plugin missing" template.
Release date: Sep 10 2023
- Fix nav-tabs appearing on pages without
tab_group
.
Release date: Jun 20 2023
- Add
allow_on_front
setting to CMB2 pages. Hooks metabox oncmb2_init
instead ofcmb2_admin_init
. - If defined
WPH_DEBUG
add WPHelper classes debug information to plugin info meta box.
Release date: Jun 9 2023
- Non-CMB2 pages can be added to CMB2 tab groups. New options
tab_group
andtab_title
- New method
render_plugin_info_meta_box
. Deprecaterender_plugin_info_box
. - Plugin info meta box rendered using
WPHelper\MetaBox
.
- Fix several PHP undefined variable warnings.
- Setting pages/wrap template uses WordPress Core
do_meta_boxes
to renderside
meta boxes div. - Add variables to
AdminPage::options()
array. - Multiple code refactoring and template restructuring.
Release date: Jan 28 2023
- Fix plugin info meta box when no PluginCore is available.
- Fix PHP deprecated notice.
Release date: Jan 15 2023
- Add action hook
wphelper/plugin_info_meta_box/{$slug}
to modify and render plugin info meta box. - Add support for
textarea
input field in SettingsPage. - Add
sanitize_callback
option - allow plugins to supply their own sanitize function. - Add
render
to fields - allow plugins to supply their own render callback for fields. - Add
placeholder
to fields - allow plugins to supply placeholder values for fields.
- Fix default value handling for fields.
- Rename
tpl/
template parts. - Minor changes and fixes.
Release date: Jan 1 2023
- Fix error when
plugin_info = true
butplugin_core
is not set.
- Minor fixes.
- Add SettingsPage section option
description-container
. Acceptscard
div,notice
,notice-info
andnone
. - Sanitize SettingsPage text, url and email fields.
- SettingsPage supports
text
,url
,email
fields. - CMB2_OptionsPage supports all admin menu top-level slugs.
- Fix PHP fatal error: cannot redeclare function
wph_extra_plugin_headers()
.
- If CMB2 plugin is not activated - show missing plugin card on
cmb2
andcmb2-tabs
pages.
- Add
wrap
parameter to output WordPress admin.wrap
template. Acceptssimple
andsidebar
. - Accept
plugin_info = true
to output default plugin info meta box and wrap. - Add
Last Update
andRelease Date
optional headers to WordPress theme headers (Used in plugin info-box).
- All classes are pluggable.
- Prevent direct access if not withing WordPress environment.
- Various improvements to CMB2 settings pages.
- Make use of CMB2 2.9.0's
options_page_tab_nav_output()
to render tabs on non-CMB2 pages. - Plugins can provide their own plugin info-box render callback.
- Parent item's first sub-menu page (itself) uses item's
tab_title
instead ofmenu_title
- Add action
wphelper/adminpage/plugin_info_box/$slug
to render plugin info-box. - Add
Last Update
andRelease Date
optional headers to WordPress plugin headers (Used in plugin info-box).
- Fix CMB2 "multi" options page to actually override fields.
- Add CMB2 fields directly in options array instead of using
add_field
method.
- Restore deprecated param to SettingsPage constructor and add
_deprecated_argument
message.
- Add CMB2 Options-page delegation. Allows adding CMB2 options page.
- Add CMB2 Options "multi" page. Allows CMB2 options page that saves each field to its own row in options table.
- Supports CMB2 tabs in CMB2 option-pages.
- Add Plugin Info metabox to CMB2 tables.
- Deprecate
AdminPage->setup
- add_doing_it_wrong
message. - Admin Page method
bootstrap()
runs oninit
hook instead of constructor. Allows setter functions to have effect.
- Add
methods
option to load functions onload-{hook_suffix}
hook. - Add
get_hook_suffix()
getter method (hook_suffix
variable is no longer public).
- New
AdminPage
class. - Deprecate class
AdminMenuPage
in favor ofAdminPage
. - Restructure source files.
- Setting Page - class and template for registering WordPress settings page.
- Options_Menu - use WordPress core
add_options_page
to register page.
- No longer require call to
setup()
method. Bootstrap into WordPress from constructor method.
- Styles - enqueue styles to registered admin page
- Don't use extract() in constructor
- Use setter methods for all variables
- Fix PHP notices: undefined property
- Removed calls to AdminNotice causing errors.
- Fixed error when no scripts are added
- Accept
render_cb
andrender_tpl
args. Userender
method instead oftemplate
- Print default template if no callback or template provided
- Initial public release
- Register and print top-level or submenu pages to WordPress admin menu
- Enqueue scripts to registered admin page