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


PHP add_users_page函数代码示例

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


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

示例1: add_admin_panel

 /**
  * Adds the admin panel and detects incoming admin actions
  *
  * When the admin submits an action like "activate" or "resend activation email", it will
  * ultimately result in a redirect. In order to minimize the amount of work done in the
  * interim page load (after the link is clicked but before the redirect happens), I check
  * for these actions (out of $_REQUEST parameters) before the admin panel is even added to the
  * Dashboard.
  *
  * @package Unconfirmed
  * @since 1.0
  *
  * @uses BBG_Unconfirmed::delete_user() to delete registrations
  * @uses BBG_Unconfirmed::activate_user() to process manual activations
  * @uses BBG_Unconfirmed::resend_email() to process manual activations
  * @uses add_users_page() to add the admin panel underneath user.php
  */
 function add_admin_panel()
 {
     $page = add_users_page(__('Unconfirmed', 'unconfirmed'), __('Unconfirmed', 'unconfirmed'), 'create_users', 'unconfirmed', array($this, 'admin_panel_main'));
     add_action("admin_print_styles-{$page}", array($this, 'add_admin_styles'));
     if (isset($_REQUEST['performed_search']) && $_REQUEST['performed_search'] == '1') {
         return;
     }
     // Look for actions first
     if (isset($_REQUEST['unconfirmed_action'])) {
         switch ($_REQUEST['unconfirmed_action']) {
             case 'delete':
                 $this->delete_user();
                 break;
             case 'activate':
                 $this->activate_user();
                 break;
             case 'resend':
             default:
                 $this->resend_email();
                 break;
         }
         $this->do_redirect();
     }
     if (isset($_REQUEST['unconfirmed_complete'])) {
         $this->setup_get_users();
     }
 }
开发者ID:cabelotaina,项目名称:redelivre,代码行数:44,代码来源:unconfirmed.php

示例2: admin_menu

 public function admin_menu()
 {
     $this->slug = add_users_page($this->title, $this->name, $this->capability, __CLASS__, array($this, 'show_page'));
     //help tabs
     add_action('load-' . $this->slug, array($this, '_help_tab'));
     add_action(__FILE__ . 'add_meta_boxes', array($this, 'add_meta_boxes'));
 }
开发者ID:kingtec,项目名称:kt-web-old,代码行数:7,代码来源:author_category_Panel_class.php

示例3: xprofile_add_admin_menu

/**
 * Creates the administration interface menus and checks to see if the DB
 * tables are set up.
 *
 * @package BuddyPress XProfile
 * @uses bp_current_user_can() returns true if the current user is a site admin, false if not
 * @uses add_users_page() Adds a submenu tab to a top level tab in the admin area
 * @return
 */
function xprofile_add_admin_menu()
{
    if (!bp_current_user_can('bp_moderate')) {
        return false;
    }
    add_users_page(_x('Profile Fields', 'xProfile admin page title', 'buddypress'), _x('Profile Fields', 'Admin Users menu', 'buddypress'), 'manage_options', 'bp-profile-setup', 'xprofile_admin');
}
开发者ID:eresyyl,项目名称:mk,代码行数:16,代码来源:bp-xprofile-admin.php

示例4: sbscrbr_admin_menu

 function sbscrbr_admin_menu()
 {
     bws_add_general_menu(plugin_basename(__FILE__));
     add_submenu_page('bws_plugins', 'Subscriber', 'Subscriber', 'manage_options', 'sbscrbr_settings_page', 'sbscrbr_settings_page');
     $hook = add_users_page(__('Subscribers', 'subscriber'), __('Subscribers', 'subscriber'), 'manage_options', 'sbscrbr_users', 'sbscrbr_users_list');
     add_action("load-{$hook}", 'sbscrbr_screen_options');
 }
开发者ID:axovel,项目名称:tattoo,代码行数:7,代码来源:subscriber.php

示例5: menu

 /**
  * Register Ad Management Panel menu
  */
 public function menu()
 {
     /* Profile Menu */
     // We are using read as an alias for edit_classifieds_listings. If a user can `read`,
     // he or she can `edit_classifieds_listings`.
     $capability = 'read';
     // Account Balance
     if (awpcp_payments_api()->credit_system_enabled() && !awpcp_current_user_is_admin()) {
         $parts = array($this->account->title, $this->account->menu, $this->account->page);
         $hook = add_users_page($parts[0], $parts[1], $capability, $parts[2], array($this->account, 'dispatch'));
         add_action("admin_print_styles-{$hook}", array($this->account, 'scripts'));
     }
     $current_user_is_non_admin_moderator = awpcp_current_user_is_moderator() && !awpcp_current_user_is_admin();
     if (get_awpcp_option('enable-user-panel') != 1 || $current_user_is_non_admin_moderator) {
         return;
     }
     /* Ad Management Menu */
     $slug = 'awpcp-panel';
     $title = sprintf(__('%s Ad Management Panel', 'AWPCP'), get_bloginfo());
     $menu = __('Ad Management', 'AWPCP');
     $hook = add_menu_page($title, $menu, $capability, $slug, array($this->listings, 'dispatch'), MENUICO);
     // Listings
     $title = __('Manage Ad Listings', 'AWPCP');
     $menu = __('Listings', 'AWPCP');
     $hook = add_submenu_page($slug, $title, $menu, $capability, $slug, array($this->listings, 'dispatch'));
     add_action("admin_print_styles-{$hook}", array($this->listings, 'scripts'));
     do_action('awpcp_panel_add_submenu_page', $slug, $capability);
 }
开发者ID:sabdev1,项目名称:ljcdevsab,代码行数:31,代码来源:user-panel.php

示例6: admin_menu

 public function admin_menu()
 {
     $this->slug = add_users_page($this->title, $this->name, $this->capability, get_class(), array($this, 'show_page'));
     //help tabs
     add_action('load-' . $this->slug, array($this, '_help_tab'));
     add_action(get_class() . 'add_meta_boxes', array($this, 'add_meta_boxes'));
 }
开发者ID:doobas,项目名称:kazinopaslaptys,代码行数:7,代码来源:User_specific_content_panel.php

示例7: MBlinkdata_admin_actions

function MBlinkdata_admin_actions() {
    global $user_ID;
    if($user_ID && $user_ID>0){
        if(current_user_can('level_10')==1){
            add_users_page("Link Data From DB", "Link Data From DB", 1, "Link_Data_From_DB", "MBlinkdata_admin");
        }
    }    
}
开发者ID:raj-rk,项目名称:Raj,代码行数:8,代码来源:mb_linkData.php

示例8: test3_menu

function test3_menu()
{
    // get the hook for our admin page and use it to conditionally queue the
    // css and js for the page.
    // ref: http://wordpress.stackexchange.com/questions/41207/how-do-i-enqueue-styles-scripts-on-certain-wp-admin-pages
    $page_hook = add_users_page('Test 3 Menu Page', 'Test 3 Menu', 'edit_posts', 'test3/page_slug_name.php', 'test3_admin_page', 'dashicons-tickets', 6);
    add_action('load-' . $page_hook, 'test3_queue_scripts');
}
开发者ID:seelang2,项目名称:ClassArchive,代码行数:8,代码来源:test3_3.php

示例9: json_oauth_admin_register

/**
 * Register the admin page
 */
function json_oauth_admin_register()
{
    /**
     * Include anything we need that relies on admin classes/functions
     */
    include_once dirname(__FILE__) . '/lib/class-wp-json-authentication-oauth1-listtable.php';
    add_users_page(__('Registered OAuth Applications', 'json_oauth'), _x('Applications', 'menu title', 'json_oauth'), 'list_users', 'json-oauth', 'json_oauth_admin_render');
}
开发者ID:duncanjbrown,项目名称:OAuth1,代码行数:11,代码来源:admin.php

示例10: wp_super_edit_admin_menu_setup

/**
* Set up administration menus
*
* Function used by WordPress action to set up adminstration menus and pages
* @global object $wp_super_edit 
*/
function wp_super_edit_admin_menu_setup()
{
    global $wp_super_edit;
    $wp_super_edit_option_page = add_options_page(__('WP Super Edit', 'wp_super_edit'), __('WP Super Edit', 'wp_super_edit'), 'manage_options', basename(__FILE__), 'wp_super_edit_admin_page');
    if ($wp_super_edit->management_mode == 'users') {
        $wp_super_edit_user_page = add_users_page(__('Visual Editor Options', 'wp_super_edit'), __('Visual Editor Options', 'wp_super_edit'), 'edit_posts', 'wp-super-edit/wp-super-edit-user.php');
    }
}
开发者ID:howardlei82,项目名称:IGSM-Website,代码行数:14,代码来源:wp-super-edit-admin.php

示例11: user_menu

 static function user_menu()
 {
     // @ admin_menu
     if (is_network_admin() && !current_user_can('manage_network_users') || !current_user_can('promote_users')) {
         return;
     }
     add_users_page(__('Manage Access Areas', 'wp-access-areas'), __('Access Areas', 'wp-access-areas'), 'promote_users', 'user_labels', array(__CLASS__, 'manage_userlabels_page'));
     add_action('load-users_page_user_labels', array(__CLASS__, 'do_userlabel_actions'));
 }
开发者ID:boatlmz,项目名称:wp-access-areas,代码行数:9,代码来源:class-undisclosedcaps.php

示例12: admin_menu_link

 /**
  * Add the new menu item to the users portion of the admin menu
  *
  * @uses admin_menu
  */
 function admin_menu_link()
 {
     $show_admin_page = apply_filters('new_user_approve_show_admin_page', true);
     if ($show_admin_page) {
         $cap = apply_filters('new_user_approve_minimum_cap', 'edit_users');
         $hook = add_users_page(__('Approve New Users', 'new-user-approve'), __('Approve New Users', 'new-user-approve'), $cap, $this->_admin_page, array($this, 'approve_admin'));
         add_action('load-' . $hook, array($this, 'admin_enqueue_scripts'));
     }
 }
开发者ID:myrddraall,项目名称:new-user-approve,代码行数:14,代码来源:admin-approve.php

示例13: register

 /**
  * Register the admin page
  */
 public static function register()
 {
     /**
      * Include anything we need that relies on admin classes/functions
      */
     include_once dirname(__FILE__) . '/class-wp-rest-oauth1-listtable.php';
     $hook = add_users_page(__('Registered OAuth Applications', 'rest_oauth1'), _x('Applications', 'menu title', 'rest_oauth1'), 'list_users', self::BASE_SLUG, array(get_class(), 'dispatch'));
     add_action('load-' . $hook, array(get_class(), 'load'));
 }
开发者ID:lance0821,项目名称:OAuth1,代码行数:12,代码来源:class-wp-rest-oauth1-admin.php

示例14: qrl_user_page

function qrl_user_page()
{
    $page_title = __('QR - Login', 'qrl');
    $menu_title = __('QR - Login', 'qrl');
    $capability = 'edit_posts';
    $menu_slug = 'qrl_user_login_options';
    $function = 'qrl_user_login_render';
    add_users_page($page_title, $menu_title, $capability, $menu_slug, $function);
}
开发者ID:jellmaier,项目名称:qrlogin,代码行数:9,代码来源:qrlogin.php

示例15: jr_ps_admin_hook

/**
 * Add Admin Menu item for plugin
 * 
 * Plugin needs its own Page in the Settings section of the Admin menu.
 *
 */
function jr_ps_admin_hook()
{
    //  Add Settings Page for this Plugin
    global $jr_ps_plugin_data;
    $settings = get_option('jr_ps_settings');
    if ($settings['user_submenu']) {
        add_users_page($jr_ps_plugin_data['Name'], 'Private Site', 'add_users', 'jr_ps_settings', 'jr_ps_users_settings_page');
    }
    add_options_page($jr_ps_plugin_data['Name'], 'Private Site', 'manage_options', 'jr_ps_settings', 'jr_ps_settings_page');
}
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:16,代码来源:admin-settings.php


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