Provides simpler means of building administration pages for plugin and theme developers.
admin-page-framework.php that is located in the classes folder into your theme or plugin.if ( !class_exists( 'Admin_Page_Framework' ) )
include_once( dirname( __FILE__ ) . '/classes/admin-page-framework.php' );
class APF_GettingStarted extends Admin_Page_Framework {
}
function SetUp() {
$this->SetRootMenu( 'Settings' ); // specifies to which parent menu to belong.
$this->AddSubMenu( 'My First Setting Page', // page and menu title
'my_first_settings_page' ); // page slug
}
function do_my_first_settings_page() { // do_ + pageslug
?>
<h3>Say Something</h3>
<p>This is my first admin page!</p>
<?php
}
new APF_GettingStarted;
<?php
/* Plugin Name: Admin Page Framework - Getting Started */
if ( !class_exists( 'Admin_Page_Framework' ) )
include_once( dirname( __FILE__ ) . '/classes/admin-page-framework.php' );
class APF_GettingStarted extends Admin_Page_Framework {
function SetUp() {
$this->SetRootMenu( 'Settings' ); // specifies to which parent menu to belong.
$this->AddSubMenu( 'My First Setting Page', // page and menu title
'my_first_settings_page' ); // page slug
}
function do_my_first_settings_page() { // do_ + pageslug
?>
<h3>Say Something</h3>
<p>This is my first admin page!</p>
<?php
}
}
new APF_GettingStarted;
// That's it!
Requires: 3.0 or higher
Compatible up to: 3.5.1
Last Updated: 2013-4-7
Downloads: 1,111
Got something to say? Need help?