コード例 #1
0
<?php

/**
 * add sub admin menu under hoangweb menu page
 */
if (class_exists('HW_SKIN') && function_exists('hwskin_load_APF_Fieldtype')) {
    hwskin_load_APF_Fieldtype(HW_SKIN::SKIN_FILES);
}
/**
 * Class HW_Livechat_settings
 */
if (class_exists('AdminPageFramework')) {
    class HW_Livechat_settings extends AdminPageFramework
    {
        /**
         * root menu page
         */
        const LIVECHAT_ROOT_MENU_PAGE = 'hoangweb-theme-options';
        /**
         * page menu slug
         */
        const page_setting_slug = 'hw_livechat_settings';
        /**
         * tell the framework what page to create
         */
        public function setUp()
        {
            #self::LIVECHAT_ROOT_MENU_PAGE
            #$this->setRootMenuPage( 'Livechat');      # set the top-level page, ie add a page to the Settings page
            $this->setRootMenuPageBySlug(HW_Module_Settings_page::PAGE_SLUG);
            //add submenu page under hoangweb theme options
コード例 #2
0
<?php

/**
 * add sub admin menu under wpcf7 main menu
 */
//hwskin selector field
if (class_exists('HW_SKIN')) {
    hwskin_load_APF_Fieldtype(HW_SKIN::SKIN_LINKS);
}
if (class_exists('AdminPageFramework')) {
    //please tun off wpdebug
    class HW_Wpcf_form_settings extends AdminPageFramework
    {
        //tell the framework what page to create
        public function setUp()
        {
            //$this->setRootMenuPage( 'sdfgfgdfg' );      # set the top-level page, ie add a page to the Settings page
            $this->setRootMenuPageBySlug('wpcf7');
            //add submenu page under wpcf7
            #add sub-menu pages
            $this->addSubMenuItem(array('title' => 'Cấu hình', 'page_slug' => 'hw_wpcf7_form_settings'));
        }
        /**
         * Methods for Hooks, echo page content rule: do_{page slug} and it will be automatically gets called.
         */
        public function do_hw_wpcf7_form_settings()
        {
        }
        /**
         * show contact form settings
         */