本文整理汇总了PHP中add_plugins_page函数的典型用法代码示例。如果您正苦于以下问题:PHP add_plugins_page函数的具体用法?PHP add_plugins_page怎么用?PHP add_plugins_page使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_plugins_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpcb_plugin_menu
function wpcb_plugin_menu()
{
add_plugins_page('WPCB', 'WPCB', 'administrator', 'wpcb', 'wpcb_display');
}
示例2: siteorigin_panels_plugin_activation_page
function siteorigin_panels_plugin_activation_page()
{
if (!isset($_GET['siteorigin-pa-install'])) {
return;
}
add_plugins_page(__('Install Page Builder Plugin', 'siteorigin-panels'), __('Install Page Builder Plugin', 'siteorigin-panels'), 'install_plugins', 'siteorigin_panels_plugin_activation', 'siteorigin_panels_plugin_activation_render_page');
}
示例3: master_example_plugin_menu
/**
* This function introduces the plugin options into the 'Appearance' menu and into a top-level
* 'master plugin' menu.
*/
function master_example_plugin_menu()
{
add_plugins_page('master plugin', 'master plugin', 'administrator', 'master_plugin_options', 'master_plugin_display');
// The name of the function to call when rendering this menu's page
add_menu_page('master plugin', 'master plugin', 'administrator', 'master_plugin_menu', 'master_plugin_display');
// The callback function used to render this menu
}
示例4: cms2cms_plugin_menu
function cms2cms_plugin_menu() {
$viewProvider = new CmsPluginView();
add_plugins_page(
$viewProvider->getPluginNameLong(),
$viewProvider->getPluginNameShort(),
'activate_plugins',
'cms2cms-migration',
'cms2cms_menu_page'
);
}
示例5: addPluginsPage
public static function addPluginsPage()
{
global $wpeditor_plugin;
$page_title = __('Plugin Editor', 'wp-editor');
$menu_title = __('Plugin Editor', 'wp-editor');
$capability = 'edit_plugins';
$menu_slug = 'wpeditor_plugin';
$wpeditor_plugin = add_plugins_page($page_title, $menu_title, $capability, $menu_slug, array('WPEditorPlugins', 'addPluginsPage'));
add_action("load-{$wpeditor_plugin}", array('WPEditorPlugins', 'pluginsHelpTab'));
if (isset($_GET['page']) && $_GET['page'] == 'wpeditor_plugin') {
add_action('admin_print_styles', array('WPEditorAdmin', 'editorStylesheetAndScripts'));
}
}
示例6: uLoginSettingsPage
/**
* Добавление страницы настроек
*/
function uLoginSettingsPage()
{
$ulPluginSettings = new uLoginPluginSettings();
if (!isset($ulPluginSettings)) {
wp_die(__('Plugin uLogin has been installed incorrectly.'));
return;
}
if (function_exists('add_plugins_page')) {
$uLogin_Plugin_Settings = add_plugins_page('uLogin Plugin Settings', 'uLogin', 'manage_options', basename(__FILE__), array(&$ulPluginSettings, 'print_admin_page'));
add_action('load-' . $uLogin_Plugin_Settings, array(&$ulPluginSettings, 'uLogin_Plugin_add_help_tab'));
}
}
示例7: do_createAdminMenu
/**
* Создание админ-меню
*/
public function do_createAdminMenu()
{
global $submenu;
add_menu_page('hiWeb ' . __('Настройки', 'hiweb-core'), 'hiWeb ' . __('Настройки', 'hiweb-core'), 8, 'hiweb-settings', array(hiweb()->settings(), 'echoHtml_settingsDashboard'));
add_submenu_page('hiweb-settings', 'hiWeb ' . __('Плагины и Ассеты', 'hiweb-core'), __('Плагины и Ассеты', 'hiweb-core'), 8, 'hiweb-plugins', array(hiweb()->plugins(), 'echoHtml_dashboard'));
add_options_page('hiWeb ' . __('Настройки', 'hiweb-core'), 'hiWeb ' . __('Настройки', 'hiweb-core'), 8, 'hiweb-settings-2', array(hiweb()->settings(), 'echoHtml_settingsDashboard'));
add_plugins_page('hiWeb ' . __('Плагины и Ассеты', 'hiweb-core'), 'hiWeb ' . __('Плагины и Ассеты', 'hiweb-core'), 'read', 'hiweb-plugins-2', array(hiweb()->plugins(), 'echoHtml_dashboard'));
///Support options.php page
if (get_option('hiweb_cms_adminmenu_options', '') != '') {
add_menu_page(__('Опции WP', 'hiweb-core'), __('Опции WP', 'hiweb-core'), 8, 'options.php');
add_action('admin_enqueue_scripts', array($this, 'do_adminmenuWidgets2'));
}
//if(isset($submenu['hiweb-settings'])) unset($submenu['hiweb-settings'][0]);
//remove_submenu_page('hiweb-settings','hiweb-settings');
}
示例8: typeform_add_upsell
function typeform_add_upsell()
{
$page = add_plugins_page('Typeform', 'Typeform', 2, 'typeform-helper', 'typeform_display_helper');
}
示例9: sv_hover_admin
function sv_hover_admin()
{
global $sv_hover_options;
sv_hover_xajax();
add_plugins_page('Hover', 'Hover', 'activate_plugins', 'hover', 'sv_hover_panel');
}
示例10: edd_sample_license_menu
function edd_sample_license_menu()
{
add_plugins_page('Plugin License', 'Plugin License', 'manage_options', 'pluginname-license', 'edd_sample_license_page');
}
示例11: 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'));
}
}
}
}
}
示例12: admin_menu_init
/**
* Add the admin menu page.
*
* @action admin_menu
*/
function admin_menu_init()
{
add_plugins_page(__('SiteOrigin Widgets', 'so-widgets-bundle'), __('SiteOrigin Widgets', 'so-widgets-bundle'), apply_filters('siteorigin_widgets_admin_menu_capability', 'manage_options'), 'so-widgets-plugins', array($this, 'admin_page'));
}
示例13: add_plugins_page
/**
* Add menu item.
*
* @since 0.0.1
*/
public function add_plugins_page()
{
add_plugins_page(__('Add New'), __('Add New'), 'manage_network', 'plugin-install.php');
}
示例14: add_plugin_admin_menu
/**
* Register the administration menu for this plugin into the WordPress Dashboard menu.
*
* @since 1.0.0
*/
public function add_plugin_admin_menu()
{
$this->plugin_screen_hook_suffix = add_plugins_page(__("Woo Simple Tickets - Administration", $this->plugin_slug), __("Woo Simple Tickets", $this->plugin_slug), "read", $this->plugin_slug, array($this, "display_plugin_admin_page"));
}
示例15: add_faqs_options_page
/**
* Add plugin settings page
*/
public function add_faqs_options_page()
{
/**
* Add FAQs settings page
*/
add_plugins_page(__('Quick and Easy FAQs Settings', 'quick-and-easy-faqs'), __('Quick and Easy FAQs', 'quick-and-easy-faqs'), 'administrator', 'quick_and_easy_faqs', array($this, 'display_faqs_options_page'));
}