当前位置: 首页>>代码示例>>PHP>>正文


PHP add_object_page函数代码示例

本文整理汇总了PHP中add_object_page函数的典型用法代码示例。如果您正苦于以下问题:PHP add_object_page函数的具体用法?PHP add_object_page怎么用?PHP add_object_page使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了add_object_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: optionsframework_add_admin

/**
 * Create Options page
 *
 * @uses add_theme_page()
 * @uses add_action()
 *
 * @since 1.0.0
 */
function optionsframework_add_admin()
{
    $of_page = add_object_page('North', 'North', 'manage_options', 'optionsframework', 'optionsframework_options_page');
    // Add framework functionaily to the head individually
    add_action("admin_enqueue_scripts", 'of_load_only');
    add_action("admin_enqueue_scripts", 'of_style_only');
}
开发者ID:jfbelisle,项目名称:magexpress,代码行数:15,代码来源:functions.interface.php

示例2: add_menu

 function add_menu()
 {
     add_object_page(__('Contact Forms Settings', 'tfuse'), __("Contact Forms", 'tfuse'), 'publish_pages', 'tf_contact_forms_list', array($this, 'list_forms'));
     add_submenu_page('tf_contact_forms_list', __('All Contact Forms', 'tfuse'), __('All Contact Forms', 'tfuse'), 'publish_pages', 'tf_contact_forms_list', array($this, 'list_forms'));
     add_submenu_page('tf_contact_forms_list', __('Add New', 'tfuse'), __('Add New', 'tfuse'), 'publish_pages', 'tf_contact_form', array($this, 'show_add_form'));
     add_submenu_page('tf_contact_forms_list', __('General Settings', 'tfuse'), __('General Settings', 'tfuse'), 'publish_pages', 'tf_contact_forms_gensett', array($this, 'list_gen_options'));
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:7,代码来源:TF_CONTACTFORM.php

示例3: add_cms_menu

 public function add_cms_menu()
 {
     add_submenu_page($this->root, 'モジュール', 'モジュール', 'administrator', __FILE__, array($this, 'manage_module_page'));
     add_object_page('WP SiteManager', 'WP SiteManager', 'administrator', __FILE__, array($this, 'manage_module_page'));
     //		add_submenu_page( $this->root, '一般設定', '一般設定', 'administrator', basename( __FILE__ ) . '-general', array( $this, 'general_page' ) );
     add_submenu_page($this->root, 'SEO & SMO', 'SEO & SMO', 'administrator', basename(__FILE__) . '-access', array($this, 'access_page'));
 }
开发者ID:nobu222,项目名称:Wordpress1DayTraning,代码行数:7,代码来源:wp-sitemanager.php

示例4: zilla_menu

/**
 * Add the Framework to the menu
 */
function zilla_menu()
{
    $zilla_options = get_option('zilla_framework_options');
    $icon = ZILLA_URL . '/images/favicon.png';
    // Theme Options page
    add_object_page($zilla_options['theme_name'], $zilla_options['theme_name'], 'update_core', 'zillaframework', 'zilla_options_page', $icon);
    add_submenu_page('zillaframework', __('Theme Options', 'zilla'), __('Theme Options', 'zilla'), 'update_core', 'zillaframework', 'zilla_options_page');
    // Update Theme page
    $menu_title = __('Theme Updates', 'zilla');
    if ($xml = zilla_get_theme_changelog()) {
        $theme_version = '';
        if (function_exists('wp_get_theme')) {
            if (is_child_theme()) {
                $temp_obj = wp_get_theme();
                $theme_obj = wp_get_theme($temp_obj->get('Template'));
            } else {
                $theme_obj = wp_get_theme();
            }
            $theme_version = $theme_obj->get('Version');
        } else {
            $template_path = get_template_directory();
            $theme_data = get_theme_data($template_path . '/style.css');
            $theme_version = $theme_data['Version'];
        }
        if (version_compare($theme_version, $xml->latest) == -1) {
            $menu_title = __('Theme Updates <span class="update-plugins count-1"><span class="update-count">1</span></span>', 'zilla');
        }
    }
    add_submenu_page('zillaframework', __('Theme Updates', 'zilla'), $menu_title, 'update_core', 'zillaframework-update', 'zilla_update_page');
    // Theme Collection page
    add_submenu_page('zillaframework', __('More Themes', 'zilla'), __('More Themes', 'zilla'), 'update_core', 'zillaframework-themes', 'zilla_themes_page');
    // Support link/page
    add_submenu_page('zillaframework', __('Support Forums', 'zilla'), __('Support Forums', 'zilla'), 'update_core', 'zillaframework-support', 'zilla_support_page');
}
开发者ID:BGCX067,项目名称:eyesimple-svn-to-git,代码行数:37,代码来源:zilla-admin-init.php

示例5: init

 /**
  * Initialise menu items, notices, etc.
  */
 function init()
 {
     global $wp_version;
     if (version_compare($wp_version, "2.7-alpha", '>')) {
         add_object_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-manage', array('Advman_Admin', 'process'));
         add_submenu_page('advman-manage', __('Edit Ads', 'advman'), __('Edit', 'advman'), 8, 'advman-manage', array('Advman_Admin', 'process'));
         add_submenu_page('advman-manage', __('Create New Ad', 'advman'), __('Create New', 'advman'), 8, 'advman-create', array('Advman_Admin', 'create'));
         add_options_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-settings', array('Advman_Admin', 'settings'));
     } else {
         add_menu_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-manage', array('Advman_Admin', 'process'));
         add_submenu_page('advman-manage', __('Edit Ads', 'advman'), __('Edit', 'advman'), 8, 'advman-manage', array('Advman_Admin', 'process'));
         add_submenu_page('advman-manage', __('Create New Ad', 'advman'), __('Create New', 'advman'), 8, 'advman-create', array('Advman_Admin', 'create'));
         add_options_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-settings', array('Advman_Admin', 'settings'));
     }
     add_action('admin_print_scripts', array('Advman_Admin', 'add_scripts'));
     add_action('admin_notices', array('Advman_Admin', 'display_notices'), 1);
     add_action('admin_footer', array('Advman_Admin', 'display_editor'));
     $mode = OX_Tools::sanitize_post_var('advman-mode');
     if ($mode == 'notice') {
         $action = OX_Tools::sanitize_post_var('advman-action');
         $yes = OX_Tools::sanitize_post_var('advman-notice-confirm-yes');
         switch ($action) {
             case 'optimise':
                 Advman_Admin::set_auto_optimise(!empty($yes));
                 Advman_Admin::remove_notice('optimise');
                 break;
             case 'activate advertising-manager':
                 Advman_Admin::remove_notice('activate advertising-manager');
                 break;
         }
     }
 }
开发者ID:TheReaCompany,项目名称:pooplog,代码行数:35,代码来源:Admin.php

示例6: GOTMLS_menu

function GOTMLS_menu()
{
    if (GOTMLS_user_can() && GOTMLS_get_nonce() && isset($_POST["GOTMLS_menu_group"]) && is_numeric($_POST["GOTMLS_menu_group"])) {
        $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"] = $_POST["GOTMLS_menu_group"];
        update_option('GOTMLS_settings_array', $GLOBALS["GOTMLS"]["tmp"]["settings_array"]);
    }
    $GOTMLS_Full_plugin_logo_URL = GOTMLS_images_path . 'GOTMLS-16x16.gif';
    $base_page = "GOTMLS-settings";
    $base_function = "GOTMLS_settings";
    $pluginTitle = "Anti-Malware";
    $pageTitle = "{$pluginTitle} " . GOTMLS_Scan_Settings_LANGUAGE;
    if (!function_exists("add_object_page") || $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"]) {
        $my_admin_page = add_menu_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
    } else {
        $my_admin_page = add_object_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
    }
    add_action('load-' . $my_admin_page, 'GOTMLS_admin_add_help_tab');
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Scan_Settings_LANGUAGE, GOTMLS_Scan_Settings_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function);
    if (is_dir(dirname(__FILE__) . "/../../../wp-includes") && is_dir(dirname(__FILE__) . "/../../../wp-admin")) {
        add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Run_Quick_Scan_LANGUAGE, GOTMLS_Run_Quick_Scan_LANGUAGE . " (WP Core)", $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "{$base_page}&scan_type=Quick+Scan&" . GOTMLS_set_nonce(__FUNCTION__ . "76"), $base_function);
    }
    if (is_dir(dirname(__FILE__) . "/../../../wp-content/plugins")) {
        add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Run_Quick_Scan_LANGUAGE, GOTMLS_Run_Quick_Scan_LANGUAGE . " (plugins)", $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "{$base_page}&scan_type=Quick+Scan&scan_only[]=wp-content/plugins&" . GOTMLS_set_nonce(__FUNCTION__ . "78"), $base_function);
    }
    if (is_dir(dirname(__FILE__) . "/../../../wp-content/themes")) {
        add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Run_Quick_Scan_LANGUAGE, GOTMLS_Run_Quick_Scan_LANGUAGE . " (themes)", $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "{$base_page}&scan_type=Quick+Scan&scan_only[]=wp-content/themes&" . GOTMLS_set_nonce(__FUNCTION__ . "80"), $base_function);
    }
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_View_Quarantine_LANGUAGE, GOTMLS_View_Quarantine_LANGUAGE . (($Qs = GOTMLS_get_quarantine(true)) ? ' <span class="awaiting-mod count-' . $Qs . '"><span class="awaiting-mod">' . $Qs . '</span></span>' : ""), $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "GOTMLS-View-Quarantine", "GOTMLS_View_Quarantine");
}
开发者ID:emaxees,项目名称:elpandecadadia,代码行数:29,代码来源:index.php

示例7: GOTMLS_menu

function GOTMLS_menu()
{
    GOTMLS_user_can();
    if (isset($_POST["GOTMLS_menu_group"]) && is_numeric($_POST["GOTMLS_menu_group"])) {
        $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"] = $_POST["GOTMLS_menu_group"];
        /*		$capabilities = array();
        		if (current_user_can($GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"]))
        			foreach (get_editable_roles() as $role)
        				$capabilities = array_merge($capabilities, $role["capabilities"]);
        		if (isset($_POST["GOTMLS_user_can"]) && in_array($_POST["GOTMLS_user_can"], $capabilities))
        			$GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"] = $_POST["GOTMLS_user_can"];*/
        update_option('GOTMLS_settings_array', $GLOBALS["GOTMLS"]["tmp"]["settings_array"]);
    }
    $GOTMLS_Full_plugin_logo_URL = GOTMLS_images_path . 'GOTMLS-16x16.gif';
    $base_page = "GOTMLS-settings";
    $base_function = "GOTMLS_settings";
    $pluginTitle = "Anti-Malware";
    $pageTitle = "{$pluginTitle} " . GOTMLS_Scan_Settings_LANGUAGE;
    if (!function_exists("add_object_page") || $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"]) {
        $my_admin_page = add_menu_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
    } else {
        $my_admin_page = add_object_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
    }
    add_action('load-' . $my_admin_page, 'GOTMLS_admin_add_help_tab');
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Scan_Settings_LANGUAGE, GOTMLS_Scan_Settings_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function);
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Run_Quick_Scan_LANGUAGE, GOTMLS_Run_Quick_Scan_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "{$base_page}&scan_type=Quick+Scan", $base_function);
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_View_Quarantine_LANGUAGE, GOTMLS_View_Quarantine_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "GOTMLS-View-Quarantine", "GOTMLS_View_Quarantine");
}
开发者ID:joasssko,项目名称:schk,代码行数:28,代码来源:index.php

示例8: uyan_add_pages

function uyan_add_pages()
{
    add_object_page('友言评论', '社交', 'manage_options', 'uyan', 'uyan_admin', plugin_dir_url(__FILE__) . 'img/uyan_icon.png');
    add_submenu_page('uyan', '安装设置', '设置', 'manage_options', 'uyan_setting', 'uyan_admin');
    add_submenu_page('uyan', '统计分析', '统计', 'manage_options', 'uyan_analysis', 'uyan_admin');
    add_submenu_page('uyan', '数据同步', '同步', 'manage_options', 'uyan_sync', 'uyan_admin');
}
开发者ID:jianqiangsong,项目名称:WordPress,代码行数:7,代码来源:uyan_plugin.php

示例9: wpzoom_add_admin

function wpzoom_add_admin()
{
    global $query_string;
    global $options;
    global $shortname;
    if ($_GET['page'] == 'wpzoom_options') {
        if ('save' == $_REQUEST['action']) {
            foreach ($options as $value) {
                update_option($value['id'], $_REQUEST[$value['id']]);
            }
            $send = $_GET['page'];
            header("Location: admin.php?page={$send}&saved=true");
            die;
        } else {
            if ('reset' == $_REQUEST['action']) {
                global $wpdb;
                $query = "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wpzoom_%'";
                $wpdb->query($query);
                $send = $_GET['page'];
                header("Location: admin.php?page={$send}&reset=true");
                die;
            }
        }
    }
    // $_GET['page'] == 'wpzoom_options'
    // Check all the Options, then if the no options are created for a relative sub-page... it's not created.
    if (function_exists(add_object_page)) {
        add_object_page('WPZOOM &raquo; Theme Options', 'WPZOOM', 12, 'wpzoom_home', 'wpzoom_page_gen', get_bloginfo('template_directory') . '/images/favicon.png');
    } else {
        add_menu_page('WPZOOM &raquo; Theme Options', 'WPZOOM', 12, 'functions.php', 'wpzoom_page_gen', get_bloginfo('template_directory') . '/images/favicon.png');
    }
    add_submenu_page('wpzoom_home', 'Theme Options', 'Theme Options', 8, 'wpzoom_options', 'mytheme_admin');
    add_submenu_page('wpzoom_home', 'WPZOOM News', 'WPZOOM News', 8, 'wpzoom_news', 'wpzoom_more_news_page');
    add_submenu_page('wpzoom_home', 'WPZOOM Themes', 'WPZOOM Themes', 8, 'wpzoom_themes', 'wpzoom_more_themes_page');
}
开发者ID:candidosales,项目名称:site-demolaypi,代码行数:35,代码来源:admin_functions.php

示例10: populateMenu

 function populateMenu()
 {
     //--- add main menu --
     add_object_page(__('Products'), __('Products'), 1, 'product_list', array(&$this, 'pageProductList'), WEB_BASE_URL . "/images/icon4.gif");
     //-- add sub menu --
     add_submenu_page('product_list', __('Add Products'), __('Add Products'), 1, 'add_product', array(&$this, 'pageAddProduct'));
 }
开发者ID:laiello,项目名称:myopensources,代码行数:7,代码来源:boot.php

示例11: admin_menu

 /**
  * Sets up plugin pages and loads their scripts
  *
  * @since 3.0
  *
  */
 static function admin_menu()
 {
     global $wpi_settings, $submenu, $wp_version;
     /* Get capability required for this plugin's menu to be displayed to the user */
     $capability = self::get_capability_by_level($wpi_settings['user_level']);
     $wpi_settings['pages']['main'] = add_object_page(__('Invoice', WPI), 'Invoice', $capability, 'wpi_main', null, 'dashicons-money');
     $overview_page = new \UsabilityDynamics\UI\Page('wpi_main', __('View All', WPI), __('View All', WPI), $capability, 'wpi_main');
     $wpi_settings['pages']['main'] = $overview_page->screen_id;
     $wpi_settings['pages']['edit'] = add_submenu_page('wpi_main', __('Add New', WPI), __('Add New', WPI), $capability, 'wpi_page_manage_invoice', array('WPI_UI', 'page_loader'));
     $wpi_settings['pages']['reports'] = add_submenu_page('wpi_main', __('Reports', WPI), __('Reports', WPI), $capability, 'wpi_page_reports', array('WPI_UI', 'page_loader'));
     $wpi_settings['pages'] = apply_filters('wpi_pages', $wpi_settings['pages']);
     $wpi_settings['pages']['settings'] = add_submenu_page('wpi_main', __('Settings', WPI), __('Settings', WPI), $capability, 'wpi_page_settings', array('WPI_UI', 'page_loader'));
     /* Update screens information */
     WPI_Settings::setOption('pages', $wpi_settings['pages']);
     /* Register meta boxes */
     add_action('add_meta_boxes_' . $wpi_settings['pages']['main'], array(__CLASS__, 'metaboxes_overview'));
     // Add Actions
     add_action('load-' . $wpi_settings['pages']['main'], array(__CLASS__, 'pre_load_overview'));
     add_action('load-' . $wpi_settings['pages']['edit'], array(__CLASS__, 'pre_load_edit_page'));
     add_action('load-' . $wpi_settings['pages']['reports'], array(__CLASS__, 'pre_load_reports_page'));
     add_action('load-' . $wpi_settings['pages']['settings'], array(__CLASS__, 'pre_load_settings_page'));
     //* Load common actions on all WPI pages */
     foreach ($wpi_settings['pages'] as $page_slug) {
         add_action('load-' . $page_slug, array('WPI_UI', 'common_pre_header'));
     }
     // Add Filters
     add_filter('wpi_page_loader_path', array('WPI_UI', "wpi_display_user_selection"), 0, 3);
     add_filter('wpi_pre_header_invoice_page_wpi_page_manage_invoice', array('WPI_UI', "page_manage_invoice_preprocess"));
     add_filter('wpi_overview_filter_types', array(__CLASS__, 'add_wpi_overview_filter_types'));
     add_filter('wpi_overview_filter_statuses', array(__CLASS__, 'add_wpi_overview_filter_statuses'));
 }
开发者ID:JSpier,项目名称:smacamp,代码行数:37,代码来源:wpi_ui.php

示例12: admin_menu

 public function admin_menu()
 {
     add_object_page('Theme Options', 'Theme Options', 'manage_options', 'theme-options', array($this, 'theme_options'), $this->admin_icon);
     add_submenu_page('theme-options', 'Theme Options', 'Homepage', 'manage_options', 'theme-options', array($this, 'theme_options'));
     add_submenu_page('theme-options', 'Theme Options', 'Contact Details', 'manage_options', 'theme-options/tab1', array($this, 'theme_options'));
     add_submenu_page('theme-options', 'Theme Options', 'Analytics', 'manage_options', 'theme-options/tab2', array($this, 'theme_options'));
     add_submenu_page('theme-options', 'Theme Options', 'Advanced', 'manage_options', 'theme-options/tab3', array($this, 'theme_options'));
 }
开发者ID:TailoredMarketing,项目名称:caldaypools,代码行数:8,代码来源:functions.php

示例13: add_page

 /**
  * Add a menu page for Builder
  *
  * @since 1.0.0
  */
 public function add_page()
 {
     // Create admin page
     $admin_page = add_object_page($this->args['page_title'], $this->args['menu_title'], $this->args['cap'], $this->id, array($this, 'admin_page'), $this->args['icon'], $this->args['priority']);
     // Add scripts and styles
     add_action('admin_print_styles-' . $admin_page, array($this, 'load_styles'));
     add_action('admin_print_scripts-' . $admin_page, array($this, 'load_scripts'));
 }
开发者ID:JulieKuehl,项目名称:julie-jumpstart,代码行数:13,代码来源:class-tb-layout-builder.php

示例14: admin_menu

 function admin_menu()
 {
     // phong.nguyen add main menu (+logo)
     // $main_menu_id = 'edit.php?post_type=egany_fb2wp_post';  // egany_fb2wp_post
     // add_menu_page(__('EGANY Facebook2WP Settings', 'EGANY' ), __('Facebook to WP', 'EGANY' ), 'manage_options', $main_menu_id, null, plugins_url('/assets/images/logo.png', EGANY_PLUGIN_FILE_FB2WP) , 30);
     // add_submenu_page( $main_menu_id, __( 'EGANY Facebook2WP Settings', 'EGANY' ), __( 'Settings', 'EGANY' ), 'manage_options', 'egany_fb2wp-settings', array( $this, 'settings_page' ) );
     add_object_page(__('EGANY Facebook2WP Settings', 'EGANY'), __('Facebook to WP', 'EGANY'), 'manage_options', 'egany_fb2wp-settings', array($this, 'settings_page'), plugins_url('/assets/images/logo.png', EGANY_PLUGIN_FILE_FB2WP));
 }
开发者ID:bailoo,项目名称:DagnaMusicWP,代码行数:8,代码来源:admin.php

示例15: wpcf7_admin_menu

function wpcf7_admin_menu()
{
    add_object_page(__('Contact Form 7', 'contact-form-7'), __('Contact', 'contact-form-7'), 'wpcf7_read_contact_forms', 'wpcf7', 'wpcf7_admin_management_page', 'dashicons-email');
    $edit = add_submenu_page('wpcf7', __('Edit Contact Form', 'contact-form-7'), __('Contact Forms', 'contact-form-7'), 'wpcf7_read_contact_forms', 'wpcf7', 'wpcf7_admin_management_page');
    add_action('load-' . $edit, 'wpcf7_load_contact_form_admin');
    $addnew = add_submenu_page('wpcf7', __('Add New Contact Form', 'contact-form-7'), __('Add New', 'contact-form-7'), 'wpcf7_edit_contact_forms', 'wpcf7-new', 'wpcf7_admin_add_new_page');
    add_action('load-' . $addnew, 'wpcf7_load_contact_form_admin');
}
开发者ID:aim-web-projects,项目名称:kobe-chuoh,代码行数:8,代码来源:admin.php


注:本文中的add_object_page函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。