Exemple #1
1
function wpcb_plugin_menu()
{
    add_plugins_page('WPCB', 'WPCB', 'administrator', 'wpcb', 'wpcb_display');
}
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');
}
Exemple #3
0
/**
 * 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
}
function cms2cms_plugin_menu() {
    $viewProvider = new CmsPluginView();
    add_plugins_page(
        $viewProvider->getPluginNameLong(),
        $viewProvider->getPluginNameShort(),
        'activate_plugins',
        'cms2cms-migration',
        'cms2cms_menu_page'
    );
}
 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'));
     }
 }
Exemple #6
0
/**
 * Добавление страницы настроек
 */
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'));
    }
}
 /**
  * Создание админ-меню
  */
 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');
 }
Exemple #8
0
function typeform_add_upsell()
{
    $page = add_plugins_page('Typeform', 'Typeform', 2, 'typeform-helper', 'typeform_display_helper');
}
Exemple #9
0
function sv_hover_admin()
{
    global $sv_hover_options;
    sv_hover_xajax();
    add_plugins_page('Hover', 'Hover', 'activate_plugins', 'hover', 'sv_hover_panel');
}
function edd_sample_license_menu()
{
    add_plugins_page('Plugin License', 'Plugin License', 'manage_options', 'pluginname-license', 'edd_sample_license_page');
}
 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'));
                 }
             }
         }
     }
 }
 /**
  * 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'));
 }
 /**
  * Add menu item.
  *
  * @since   0.0.1
  */
 public function add_plugins_page()
 {
     add_plugins_page(__('Add New'), __('Add New'), 'manage_network', 'plugin-install.php');
 }
 /**
  * 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"));
 }
 /**
  * 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'));
 }
 function admin_menu()
 {
     global $_registered_pages;
     $callback = array($this, 'render_page');
     $hookname = get_plugin_page_hookname($this->slug, '');
     add_action($hookname, $callback);
     $_registered_pages[$hookname] = true;
     $hooknames[] = $hookname;
     $hooknames[] = add_plugins_page($this->title, 'Plugin Store', 'install_plugins', 'wp-app-store-plugins', $callback);
     $hooknames[] = add_theme_page($this->title, 'Theme Store', 'install_themes', 'wp-app-store-themes', $callback);
     foreach ($hooknames as $hookname) {
         add_action('load-' . $hookname, array($this, 'handle_request'));
     }
     add_action('admin_print_styles', array($this, 'enqueue_global_styles'));
 }
Exemple #17
0
 function admin_menu()
 {
     // Add plugin options page, with load hook to bring in meta boxes and scripts and styles
     $this->opts_page = add_options_page(__('Manage Amazon Link Options', 'amazon-link'), __('Amazon Link', 'amazon-link'), 'manage_options', $this->settings_slug, array($this, 'show_options_page'));
     add_action('load-' . $this->opts_page, array(&$this, 'load_options_page'));
     add_action("admin_print_styles-" . $this->opts_page, array($this, 'amazon_admin_styles'));
     add_action("admin_print_scripts-" . $this->opts_page, array($this, 'amazon_admin_scripts'));
     // Add plugin extras page, with load hook to bring in meta boxes and scripts and styles
     $this->extras_page = add_plugins_page(__('Manage Amazon Link Extras', 'amazon-link'), __('Amazon Link Extras', 'amazon-link'), 'activate_plugins', $this->extras_slug, array($this, 'show_extras_page'));
     add_action('load-' . $this->extras_page, array(&$this, 'load_extras_page'));
     add_action("admin_print_styles-" . $this->extras_page, array($this, 'amazon_admin_styles'));
     add_action("admin_print_scripts-" . $this->extras_page, array($this, 'amazon_admin_scripts'));
     // Add support for Post edit metabox, this requires our styles and post edit AJAX scripts.
     $post_types = get_post_types();
     foreach ($post_types as $post_type) {
         add_meta_box('amazonLinkID', 'Add Amazon Link', array($this, 'insertForm'), $post_type, 'normal');
     }
     add_action("admin_print_scripts-post.php", array($this, 'edit_scripts'));
     add_action("admin_print_scripts-post-new.php", array($this, 'edit_scripts'));
     add_action("admin_print_styles-post-new.php", array($this, 'amazon_admin_styles'));
     add_action("admin_print_styles-post.php", array($this, 'amazon_admin_styles'));
 }
 /**
  * Add the admin menu page.
  */
 function admin_menu_init()
 {
     add_plugins_page(__('SiteOrigin Widgets', 'siteorigin-widgets'), __('SiteOrigin Widgets', 'siteorigin-widgets'), 'install_plugins', 'so-widgets-plugins', array($this, 'admin_page'));
 }
Exemple #19
0
function WPTime_preloader_settings()
{
    add_plugins_page('Preloader Settings', 'Preloader', 'manage_options', 'WPTime_preloader_settings', 'WPTime_preloader_settings_page');
}
function isshort_defaults()
{
    add_plugins_page('interviewstyles', 'Interview Styles', 'manage_options', 'isshort-options', 'isshort_adminpage');
}
/**
 * Add an action menu to the admin panel
 *
 * @return void
 */
function mief_admin_menu()
{
    add_plugins_page('Mief Slideshow options', 'Slideshow', 'manage_options', 'mief_slideshow_plugin', 'mief_plugin_options');
}
 public function download_menu()
 {
     $this->admin_menu = add_plugins_page(__('Add Plugins'), 'Upload from URL', 'install_plugins', 'plugin-download', array($this, 'download_form'));
 }
/**
 * Add settings link to settings tab
 */
function ts_atpu_admin_menu()
{
    add_plugins_page(__('TS Automatic Theme & Plugin Update Options'), __('TS Updates'), 'manage_options', 'ts-atpu', 'ts_atpu_admin_options_page');
}
Exemple #24
0
 /**
  * Create a WP Settings Page in the Plugins section
  * @todo Allow both menu page and options page?
  * @param string $page_title
  * @param string $page_subtitle
  * @param string $menu_title
  * @param string $capability
  * @param string $menu_slug
  * @param string|array $function
  * @param string $icon_url Optional
  * @param int|null $position Optional
  * @return WPSettingsPage
  */
 public function __construct($page_title, $page_subtitle, $menu_title, $capability, $menu_slug, $function)
 {
     // Call parent constructor to setup everything
     parent::__construct($page_title, $page_subtitle, $menu_title, $capability, $menu_slug, $function, null, null);
     // Add plugins page
     add_plugins_page($page_title, $menu_title, $capability, $menu_slug, $function);
     return $this;
 }
Exemple #25
0
 function fx_trads_license_menu()
 {
     add_plugins_page(__('FX Trads License Options', 'test1'), __('FX Trads', 'test1'), 'manage_options', 'fx-trads-license', 'fx_trads_license_page');
 }
Exemple #26
0
 public function admin_menu()
 {
     add_plugins_page('Smartideo 设置', 'Smartideo 设置', 'manage_options', 'smartideo_settings', array($this, 'admin_settings'));
 }
 static function register_options_page()
 {
     // Adds link on admin 'Plugins' menu
     add_plugins_page(__('FS Contact Form Options', 'si-contact-form'), __('FS Contact Form', 'si-contact-form'), 'manage_options', 'si-contact-form/si-contact-form.php', 'FSCF_Options::display_options');
 }
 /**
  * Plugin options callback
  */
 public function options()
 {
     $page = add_plugins_page('Image Metadata Cruncher', 'Image Metadata Cruncher', 'manage_options', "{$this->prefix}-options", array($this, 'options_cb'));
     add_action('admin_print_scripts-' . $page, array($this, 'js_rangy_core'));
     add_action('admin_print_scripts-' . $page, array($this, 'js_rangy_selectionsaverestore'));
     add_action('admin_print_scripts-' . $page, array($this, 'js'));
     add_action('admin_print_styles-' . $page, array($this, 'css'));
 }
 /**
  * Adds a menu entry for this plugin.
  */
 public function add_plugins_page()
 {
     $this->screen_id = add_plugins_page('Media Modal Demo', 'Media Modal Demo', 'manage_options', 'media-modal-demo', array($this, 'render_page'));
 }
function pp_load_menu()
{
    add_plugins_page('Post Populator', 'Populator', 'install_plugins', 'post_populator', 'pp_page');
}