Provides simpler means of building administration pages for plugin and theme developers.
The framework internally uses the
add_submenu_page() function to register sub menu pages. When the same page slug is registered for multiple root pages, only the last registered callback gets triggered. The other ones will be ignored.
This means if you choose a very simple page slug such as
about for your plugin/theme's information page and then if there is another plugin using same page slug, your users will get either of your page or the other.
So just use a unique page slug. One way to do that is to add a prefix like
When you include the library, change the class names that the library uses. This is because if there is a plugin that uses a lesser version of the library and it is loaded earlier than yours, your script may not work properly.
All the class names have the prefix
AdminPageFramework so just change it to something like
Most text editors supports the Replace All command so just use that. By the time WordPress's minimum required PHP version becomes 5.3 or higher, we can use namespaces then this problem will be solved.Change Framework's System Messages
The default messages defined by the framework can be changed. For example when you import a setting with the framework, the setting notice will be displayed.
If you want to change it to something else, modify the
oMsg object. It has the
aMessages public property array which holds all the messages that the library uses.
To specify a custom size to the preview element of the
image field type, set an attribute array like the below, where 300px is the max width.
array( 'field_id' => 'my_image_field_id', 'title' => __( 'Image', 'admin-page-framework-demo' ), 'type' => 'image', 'attributes' => array( 'style' => 'max-width:300px;', ), ),
Check out the issues on GitHub labeled enhancement.
Requires: 3.3 or higher
Compatible up to: 3.9.1
Last Updated: 2014-5-10
3 of 5 support threads in the last two months have been resolved.
Got something to say? Need help?