setCapability( 'read' ); /* (required) Set the root page */ $this->setRootMenuPage( 'Admin Page Framework' ); // or $this->setRootMenuPageBySlug( 'sites.php' ); // Pages new APF_Demo_BuiltinFieldType( $this->oProp->sClassName ); new APF_Demo_AdvancedUsage( $this->oProp->sClassName ); /* * (optional) Add links in the plugin listing table. ( .../wp-admin/plugins.php ) */ $this->addLinkToPluginDescription( "Donate", "Repository" ); $this->addLinkToPluginTitle( "miunosoft" ); } public function load() { /* (optional) Determine the page style */ $this->setPageHeadingTabsVisibility( false ); // disables the page heading tabs by passing false. $this->setInPageTabTag( 'h2' ); // sets the tag used for in-page tabs $this->setPluginSettingsLinkLabel( '' ); // pass an empty string to disable it. // Used to insert PHP code in example fields. $this->oWPRMParser = new AdminPageFramework_WPReadmeParser; } /* * Built-in Field Types Page * * @callback action do_{page slug} * */ public function do_apf_builtin_field_types() { if ( isset( $_GET['tab'] ) && 'system' === $_GET['tab'] ) { return; } submit_button(); } /* * The sample page and the hidden page * * @callback action do_{page slug} */ public function do_apf_sample_page() { echo "

" . __( 'This is a sample page that has a link to a hidden page created by the framework.', 'admin-page-framework-loader' ) . "

"; $sLinkToHiddenPage = $this->oUtil->getQueryAdminURL( array( 'page' => 'apf_hidden_page' ) ); echo "" . __( 'Go to Hidden Page', 'admin-page-framework-loader' ). ""; } /** * @callback action do_{page slug} */ public function do_apf_hidden_page() { echo "

" . __( 'This is a hidden page.', 'admin-page-framework-loader' ) . "

"; echo "

" . __( 'It is useful when you have a setting page that requires a proceeding page.', 'admin-page-framework-loader' ) . "

"; $sLinkToGoBack = $this->oUtil->getQueryAdminURL( array( 'page' => 'apf_sample_page' ) ); echo "" . __( 'Go Back', 'admin-page-framework-loader' ). ""; } } new APF_NetworkAdmin( null, // passing the option key used by the main pages. AdminPageFrameworkLoader_Registry::$sFilePath, // the caller script path. 'manage_options', // the default capability 'admin-page-framework-loader' // the text domain );