本文整理汇总了PHP中add_dashboard_page函数的典型用法代码示例。如果您正苦于以下问题:PHP add_dashboard_page函数的具体用法?PHP add_dashboard_page怎么用?PHP add_dashboard_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_dashboard_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admin_menus
/**
* Register the Dashboard Pages which are later hidden but these pages
* are used to render the Welcome and Credits pages.
*
* @access public
* @since 1.2
* @return void
*/
public function admin_menus()
{
// About Page
add_dashboard_page(__('Welcome to Post Promoter Pro', 'ppp-txt'), __('Welcome to Post Promoter Pro', 'ppp-txt'), $this->minimum_capability, 'ppp-about', array($this, 'about_screen'));
// Getting Started Page
add_dashboard_page(__('Getting started with Post Promoter Pro', 'ppp-txt'), __('Getting started with Post Promoter Pro', 'ppp-txt'), $this->minimum_capability, 'ppp-getting-started', array($this, 'getting_started_screen'));
}
示例2: admin_menus
/**
* Add admin menus/screens
*
* @access public
* @return void
*/
public function admin_menus()
{
$welcome_page_name = __('Install WPLMS', 'vibe');
$welcome_page_title = __('Welcome to WPLMS', 'vibe');
if (!$this->check_installed()) {
$page = add_dashboard_page($welcome_page_title, $welcome_page_name, 'manage_options', 'wplms-install', array($this, 'install_screen'));
add_action('admin_print_styles-' . $page, array($this, 'admin_css'));
}
if (empty($_GET['page'])) {
return;
}
$welcome_page_name = __('About WPLMS', 'vibe');
$welcome_page_title = __('Welcome to WPLMS', 'vibe');
switch ($_GET['page']) {
case 'wplms-about':
$page = add_dashboard_page($welcome_page_title, $welcome_page_name, 'manage_options', 'wplms-about', array($this, 'about_screen'));
add_action('admin_print_styles-' . $page, array($this, 'admin_css'));
break;
case 'wplms-system':
$page = add_dashboard_page($welcome_page_title, $welcome_page_name, 'manage_options', 'wplms-system', array($this, 'system_screen'));
add_action('admin_print_styles-' . $page, array($this, 'admin_css'));
break;
case 'wplms-changelog':
$page = add_dashboard_page($welcome_page_title, $welcome_page_name, 'manage_options', 'wplms-changelog', array($this, 'changelog_screen'));
add_action('admin_print_styles-' . $page, array($this, 'admin_css'));
break;
}
}
示例3: add_statistics_menu
/**
* Add SendGrid statistics page in the menu
*
* @return void
*/
public static function add_statistics_menu()
{
if (Sendgrid_Tools::get_auth_method() == "apikey" and !Sendgrid_Tools::check_api_key(Sendgrid_Tools::get_api_key()) or Sendgrid_Tools::get_auth_method() == "username" and !Sendgrid_Tools::check_username_password(Sendgrid_Tools::get_username(), Sendgrid_Tools::get_password())) {
return;
}
add_dashboard_page("SendGrid Statistics", "SendGrid Statistics", "manage_options", "sendgrid-statistics", array(__CLASS__, "show_statistics_page"));
}
示例4: relevanssi_menu
function relevanssi_menu()
{
global $relevanssi_variables;
RELEVANSSI_PREMIUM ? $name = "Relevanssi Premium" : ($name = "Relevanssi");
add_options_page($name, $name, apply_filters('relevanssi_options_capability', 'manage_options'), $relevanssi_variables['file'], 'relevanssi_options');
add_dashboard_page(__('User searches', 'relevanssi'), __('User searches', 'relevanssi'), apply_filters('relevanssi_user_searches_capability', 'edit_pages'), $relevanssi_variables['file'], 'relevanssi_search_stats');
}
示例5: admin_menus
/**
* Register the Dashboard Pages which are later hidden but these pages
* are used to render the Welcome and Credits pages.
*
* @access public
* @since 1.4
* @return void
*/
public function admin_menus()
{
// About
add_dashboard_page(__('Theme Details', 'wpex'), __('Theme Details', 'wpex'), $this->minimum_capability, 'wpex-about', array($this, 'about_screen'));
// Recommended
add_dashboard_page(__('Recommendations | GoPress Theme', 'wpex'), __('Recommendations', 'wpex'), $this->minimum_capability, 'wpex-recommended', array($this, 'recommended_screen'));
}
示例6: admin_menus
/**
* Add admin menus/screens
*
* @access public
* @return void
*/
public function admin_menus()
{
if (empty($_GET['page'])) {
return;
}
$welcome_page_name = __('About WP Club Manager', 'wp-club-manager');
$welcome_page_title = __('Welcome to WP Club Manager', 'wp-club-manager');
switch ($_GET['page']) {
case 'wpcm-about':
$page = add_dashboard_page($welcome_page_title, $welcome_page_name, 'manage_options', 'wpcm-about', array($this, 'about_screen'));
add_action('admin_print_styles-' . $page, array($this, 'admin_css'));
break;
case 'wpcm-getting-started':
$page = add_dashboard_page($welcome_page_title, $welcome_page_name, 'manage_options', 'wpcm-getting-started', array($this, 'getting_started_screen'));
add_action('admin_print_styles-' . $page, array($this, 'admin_css'));
break;
case 'wpcm-changelog':
$page = add_dashboard_page($welcome_page_title, $welcome_page_name, 'manage_options', 'wpcm-changelog', array($this, 'changelog_screen'));
add_action('admin_print_styles-' . $page, array($this, 'admin_css'));
break;
case 'wpcm-translators':
$page = add_dashboard_page($welcome_page_title, $welcome_page_name, 'manage_options', 'wpcm-translators', array($this, 'translators_screen'));
add_action('admin_print_styles-' . $page, array($this, 'admin_css'));
break;
}
}
示例7: add_statistics_menu
/**
* Add SendGrid statistics page in the menu
*
* @return void
*/
public static function add_statistics_menu()
{
if (!Sendgrid_Tools::check_username_password(get_option('sendgrid_user'), get_option('sendgrid_pwd'))) {
return;
}
add_dashboard_page("SendGrid Statistics", "SendGrid Statistics", "manage_options", "sendgrid-statistics", array(__CLASS__, "show_statistics_page"));
}
示例8: tcp_admin_menu
public function tcp_admin_menu()
{
//new version page
$title = __('Enjoy TheCartPress', 'tcp');
$new_version = add_dashboard_page($title, $title, 'manage_options', 'tcp-new-version', array($this, 'new_version_page'));
//add_action( "admin_print_styles-$new_version", array( $this, 'new_version_css' ) );
}
示例9: add_menu
public function add_menu()
{
$hook = add_dashboard_page('vendidero', 'Vendidero', 'manage_options', 'vendidero', array($this, 'screen'));
add_action('load-' . $hook, array($this, 'process'));
add_action('admin_print_styles-' . $hook, array($this, 'enqueue_styles'));
add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
}
示例10: msa_welcome_menus
/**
* Create the menus on the welcome page
*
* @access public
* @return void
*/
function msa_welcome_menus()
{
// Getting Started Page.
add_dashboard_page(__('Getting Started with My Site Audit', 'msa'), __('Getting Started with My Site Audit', 'msa'), 'manage_options', 'msa-getting-started', 'msa_welcome_getting_started_page');
/*
// About Page
add_dashboard_page(
__( 'About My Site Audit', 'msa' ),
__( 'About My Site Audit', 'msa' ),
'manage_options',
'msa-about',
'msa_welcome_about_page'
);
// Changelog Page
add_dashboard_page(
__( 'My Site Audit Changelog', 'msa' ),
__( 'My Site Audit Changelog', 'msa' ),
'manage_options',
'msa-changelog',
'msa_welcome_changelog_page'
);
*/
// Credits Page.
add_dashboard_page(__('Creators of My Site Audit', 'msa'), __('Creators of My Site Audit', 'msa'), 'manage_options', 'msa-credits', 'msa_welcome_credits_page');
}
示例11: admin_menus
/**
* Register the Dashboard Pages which are later hidden but these pages
* are used to render the Welcome and Credits pages.
*
* @access public
* @since 1.0
* @return void
*/
public function admin_menus()
{
// About Page
add_dashboard_page(__('Welcome to WP User Manager', 'wpum'), __('Welcome to WP User Manager', 'wpum'), $this->minimum_capability, 'wpum-about', array($this, 'about_screen'));
// Getting Started Page
add_dashboard_page(__('Getting started with WP User Manager', 'wpum'), __('Getting started with WP User Manager', 'wpum'), $this->minimum_capability, 'wpum-getting-started', array($this, 'getting_started_screen'));
}
示例12: admin_menu
public function admin_menu()
{
$this->user_created_pages = SerializeStringToArray(get_option($this->prefix('user_created_pages')));
if ($this->user_created_pages && count($this->user_created_pages) >= 1) {
foreach ($this->user_created_pages as $page) {
if (isset($page['page_slug']) && isset($page['page_title']) && isset($page['parent_menu'])) {
if ($page['parent_menu'] == 'new_menu') {
add_menu_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'dashboard') {
add_dashboard_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'posts') {
add_posts_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'media') {
add_media_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'pages') {
add_pages_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'comments') {
add_comments_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'theme') {
add_theme_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'plugins') {
add_plugins_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'users') {
add_users_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'management') {
add_management_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif ($page['parent_menu'] == 'options') {
add_options_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
} elseif (array_key_exists($page['parent_menu'], $user_pages)) {
add_submenu_page($page['parent_menu'], $page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
}
}
}
}
}
示例13: admin_menu
/**
* Add admin menus/screens
*/
public function admin_menu()
{
$page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_STRING);
if ('pronamic-pay-about' === $page) {
$hook_suffix = add_dashboard_page(__('About Pronamic Pay', 'pronamic_ideal'), __('Welcome to Pronamic Pay', 'pronamic_ideal'), 'manage_options', $page, array($this, 'page_about'));
add_action('admin_print_styles-' . $hook_suffix, array($this, 'admin_css'));
}
}
示例14: admin_menus
public function admin_menus()
{
$welcome_page_title = __('Welcome to WP PRO Advertising System', 'wpproads');
// About
$about = add_dashboard_page($welcome_page_title, $welcome_page_title, 'manage_options', 'pas-about', array($this, 'about_screen'));
remove_submenu_page('index.php', 'pas-about');
add_action('admin_print_styles-' . $about, array($this, 'admin_css'));
}
示例15: registerAdminMenu
public function registerAdminMenu()
{
add_options_page(__('Buoy Settings', 'better-angels'), __('Buoy', 'better-angels'), 'manage_options', $this->prefix . 'settings', array($this, 'renderOptionsPage'));
add_menu_page(__('Emergency Team', 'better-angels'), __('My Team', 'better-angels'), 'read', $this->prefix . 'choose-angels', array($this, 'renderChooseAngelsPage'), plugins_url('img/icon-bw-life-preserver.svg', __FILE__));
add_submenu_page(null, __('Respond to Alert', 'better-angels'), __('Respond to Alert', 'better-angels'), 'read', $this->prefix . 'review-alert', array($this, 'renderReviewAlertPage'));
add_submenu_page(null, __('Incident Chat', 'better-angels'), __('Incident Chat', 'better-angels'), 'read', $this->prefix . 'incident-chat', array($this, 'renderIncidentChatPage'));
add_dashboard_page(__('Activate Alert', 'better-angels'), __('Activate Alert', 'better-angels'), 'read', $this->prefix . 'activate-alert', array($this, 'renderActivateAlertPage'));
}