예제 #1
1
function rt_simplemap_add_pages()
{
    // Add a new submenu under Options:
    add_options_page('SimpleMap Options', 'SimpleMap', 8, 'rt_simplemap', 'rt_simplemap_options_page');
    // Add a new submenu under Manage:
    add_management_page('SimpleMap Manage', 'SimpleMap', 8, 'rt_simplemap', 'rt_simplemap_manage_page');
}
예제 #2
0
 public function register_screen()
 {
     $title = __('Event Data Cleanup', 'eventrocket');
     $capability = $this->min_capability;
     $callback = array($this, 'screen');
     add_management_page($title, $title, $capability, 'eventrocket_jettison', $callback);
 }
 /**
  * @internal
  */
 public function _admin_action_admin_menu()
 {
     if (!current_user_can(self::backups()->get_capability()) || !$this->get_demos()) {
         return;
     }
     add_management_page(__('Demo Content Install', 'fw'), __('Demo Content Install', 'fw'), self::backups()->get_capability(), $this->get_page_slug(), array($this, '_display_page'));
 }
예제 #4
0
 /**
  * Add shortcodes menu
  **/
 function bb_zx_menu()
 {
     // Add a submenu item and page to Tools
     add_management_page('Axiomz Tools Menu', 'Axiomz Tools Menu Title', 'export', 'bb-zx-tools-page', array($this, 'bb_zx_tools_page'));
     // Add submenu items to other pages
     // Dashboard
     //add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Posts
     //add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Media
     //add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Pages
     //add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Comments
     //add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Appearance
     //add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Plugins
     //add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Users
     //add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Settings
     //add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function);
     // Add top level page to admin menu & add submenu item to it
     //add_menu_page('Page title', 'Top-level menu title', 'manage_options', 'my-top-level-handle', 'my_magic_function');
     //add_submenu_page( 'my-top-level-handle', 'Page title', 'Sub-menu title', 'manage_options', 'my-submenu-handle', 'my_magic_function');
 }
예제 #5
0
function wii2wx_add_page()
{
    // the 'aspen_switcher' is the ?page= name for forms - use different if not add_theme_page
    //$page = add_theme_page(
    $page = add_management_page('Weaver II to Weaver Xtreme', 'Weaver Converter', 'manage_options', 'wii2wx_tools', 'wii2wx_admin');
    add_action('admin_print_styles-' . $page, 'wii2wx_load_admin_scripts');
}
 public function admin_menu()
 {
     $this->page_hook = add_management_page(__('Rewrite analyzer', $this->gettext_domain), __('Rewrite analyzer', $this->gettext_domain), 'administrator', 'monkeyman-rewrite-analyzer', array(&$this, 'do_analyze_page'));
     add_action('admin_print_styles-' . $this->page_hook, array(&$this, 'admin_print_styles'));
     add_action('admin_print_scripts-' . $this->page_hook, array(&$this, 'admin_print_scripts'));
     add_filter('contextual_help', array(&$this, 'contextual_help'), 10, 3);
 }
예제 #7
0
파일: po_composer.php 프로젝트: pcuervo/odc
 function admin_menu_item()
 {
     // In this case menu item is add in admin menu 'Appearance'
     //add_theme_page(__('PO Composer', 'axiom'), __('PO Composer', 'axiom'), 'edit_theme_options', 'po_composer', array($this, 'build_page'));
     // In this case menu item is add in admin menu 'Tools'
     add_management_page(__('PO Composer', 'axiom'), __('PO Composer', 'axiom'), 'manage_options', 'po_composer', array($this, 'build_page'));
 }
 /**
  * Add menu item/ui page
  * @since 1.0.0
  */
 public function add_page()
 {
     $this->admin_title = __('Taxonomy Switcher', 'wds');
     $this->admin_slug = 'taxonomy-switcher';
     $this->options_page = add_management_page($this->admin_title, $this->admin_title, 'manage_options', $this->admin_slug, array($this, 'do_page'));
     add_action('admin_head-' . $this->options_page, array($this, 'js'));
 }
예제 #9
0
 public function admin_menu()
 {
     $betterAnalyticsOptions = get_option('better_analytics');
     $currentUser = wp_get_current_user();
     $canViewSettings = empty($betterAnalyticsOptions['lock_settings_user_id']) || $betterAnalyticsOptions['lock_settings_user_id'] == $currentUser->ID;
     add_management_page(esc_html__('Test Analytics Setup', 'better-analytics'), esc_html__('Test Analytics Setup', 'better-analytics'), 'manage_options', 'better-analytics_test', array($this, 'display_test_page'));
     add_management_page(esc_html__('OAuth2 Endpoint', 'better-analytics'), esc_html__('OAuth2 Endpoint', 'better-analytics'), 'manage_options', 'better-analytics_auth', array($this, 'api_authentication'));
     if (DigitalPointBetterAnalytics_Base_Public::getInstance()->canViewReports()) {
         add_menu_page(esc_html__('Analytics', 'better-analytics'), esc_html__('Analytics', 'better-analytics'), 'read', 'better-analytics_heatmaps', null, 'dashicons-chart-line', 3.1975123);
         add_submenu_page('better-analytics_heatmaps', esc_html__('Heat Maps', 'better-analytics'), esc_html__('Reports', 'better-analytics'), 'read', 'better-analytics_heatmaps', array($this, 'display_page'));
         add_submenu_page('better-analytics_heatmaps', esc_html__('Charts', 'better-analytics'), esc_html__('Charts', 'better-analytics'), 'read', 'better-analytics_areacharts', array($this, 'display_page'));
         add_submenu_page('better-analytics_heatmaps', esc_html__('Issue Monitor', 'better-analytics'), esc_html__('Issue Monitor', 'better-analytics'), 'read', 'better-analytics_monitor', array($this, 'display_page'));
         add_submenu_page('better-analytics_heatmaps', esc_html__('Events', 'better-analytics'), esc_html__('Events', 'better-analytics'), 'read', 'better-analytics_events', array($this, 'display_page'));
     }
     add_submenu_page('better-analytics_heatmaps', esc_html__('Goals', 'better-analytics'), esc_html__('Goals', 'better-analytics'), 'manage_options', 'better-analytics_goals', array($this, 'display_page'));
     add_submenu_page('better-analytics_heatmaps', esc_html__('A/B Testing', 'better-analytics'), esc_html__('A/B Testing', 'better-analytics'), 'manage_options', 'better-analytics_experiments', array($this, 'display_page'));
     if ($canViewSettings) {
         add_submenu_page('better-analytics_heatmaps', esc_html__('Settings', 'better-analytics'), esc_html__('Settings', 'better-analytics'), 'manage_options', 'options-general.php' . '?page=better-analytics');
     }
     add_submenu_page('better-analytics_heatmaps', esc_html__('Test Setup', 'better-analytics'), esc_html__('Test Setup', 'better-analytics'), 'manage_options', 'tools.php' . '?page=better-analytics_test');
     if ($canViewSettings) {
         $hook = add_options_page(esc_html__('Better Analytics', 'better-analytics'), esc_html__('Better Analytics', 'better-analytics'), 'manage_options', 'better-analytics', array($this, 'display_configuration_page'));
         add_action("load-{$hook}", array($this, 'admin_help'));
     }
 }
예제 #10
0
 function managementInit()
 {
     global $management;
     wp_enqueue_script('listman');
     add_management_page('Quotes', 'Quotes', 5, basename(__FILE__), array(&$management, 'displayManagementPage'));
     add_options_page('Flexi Quote Rotator Options', 'Quote Rotator', 10, basename(__FILE__), array(&$management, 'displayOptionsPage'));
 }
예제 #11
0
function filebrowser_menu_entry()
{
    $hook = add_management_page(__('FileBrowser', 'filebrowser'), __('FileBrowser', 'filebrowser'), '10', 'FileBrowser', 'filebrowser_options_page');
    add_action('load-' . $hook, 'filebrowser_options_load');
    register_column_headers($hook, array('cb' => '<input type="checkbox" />', 'name' => __('Name', 'filebrowser'), 'size' => __('Size', 'filebrowser'), 'mdate' => __('Date', 'filebrowser'), 'premissions' => __('Permissions', 'filebrowser')));
    add_contextual_help($hook, filebrowser_show_help());
}
예제 #12
0
 /**
 Hook the menu
 */
 function admin_menu()
 {
     add_management_page(__('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), "manage_options", basename(__FILE__), array(&$this, 'manage_menu'));
     add_options_page(__('Subscribe2 Options', 'subscribe2'), 'Subscribe2', "manage_options", basename(__FILE__), array(&$this, 'options_menu'));
     add_submenu_page('profile.php', __('Subscriptions', 'subscribe2'), __('Subscriptions', 'subscribe2'), "read", __FILE__, array(&$this, 'user_menu'));
     add_submenu_page('post.php', __('Mail subscribers', 'subscribe2'), __('Mail subscribers', 'subscribe2'), "manage_options", __FILE__, array(&$this, 'write_menu'));
 }
예제 #13
0
function bpdd_admin_page()
{
    if (!is_super_admin()) {
        return;
    }
    add_management_page(__('BuddyPress Default Data', 'bpdd'), __('BP Default Data', 'bpdd'), 'manage_options', 'bpdd-setup', 'bpdd_admin_page_content');
}
예제 #14
0
 /**
  * Add options settings menu and manage redirect tools
  *
  * @return void
  * @author Amaury Balmer
  */
 public function admin_menu()
 {
     $title = !isset($_GET['c_id']) ? __('BEA Send', 'bea_sender') : __('BEA Send - Campaign', 'bea_sender');
     $hook = add_management_page($title, __('BEA Send', 'bea_sender'), 'manage_options', 'bea_sender', array(&$this, 'pageManage'));
     add_action('load-' . $hook, array(__CLASS__, 'admin_enqueue_scripts'));
     add_action("admin_footer-" . $hook, array(__CLASS__, 'admin_footer'));
 }
예제 #15
0
function add_fd_page()
{
    $page = add_management_page('Find duplicates', 'Find duplicates', 'manage_options', __FILE__, 'output_fd_page');
    add_action('admin_print_styles-' . $page, 'load_javascript');
    $page = add_options_page('Find duplicates', 'Find duplicates', 'manage_options', __FILE__, 'output_fd_options_page');
    add_action('admin_print_styles-' . $page, 'load_javascript_options');
}
예제 #16
0
 function themex_admin_menu()
 {
     /**
      * The hook for the admin menu
      */
     add_management_page('ThemeX', 'ThemeX', 5, __FILE__, array($this, 'themex_admin_page'));
 }
예제 #17
0
/**
 * Add import/export page under Tools
 *
 * Also enqueue Stylesheet for this page only.
 *
 * @since 0.1
 */
function wie_add_import_export_page()
{
    // Add page
    $page_hook = add_management_page(__('Widget Importer & Exporter', 'widget-importer-exporter'), __('Widget Importer & Exporter', 'widget-importer-exporter'), 'manage_options', 'widget-importer-exporter', 'wie_import_export_page_content');
    // Enqueue stylesheet
    add_action('admin_print_styles-' . $page_hook, 'wie_enqueue_styles');
}
	function test_menu_page_url() {
		$current_user = get_current_user_id();
		wp_set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
		update_option( 'siteurl', 'http://example.com' );

		// add some pages
		add_options_page( 'Test Settings', 'Test Settings', 'manage_options', 'testsettings', 'mt_settings_page' );
		add_management_page( 'Test Tools', 'Test Tools', 'manage_options', 'testtools', 'mt_tools_page' );
		add_menu_page( 'Test Toplevel', 'Test Toplevel', 'manage_options', 'mt-top-level-handle', 'mt_toplevel_page' );
		add_submenu_page( 'mt-top-level-handle', 'Test Sublevel', 'Test Sublevel', 'manage_options', 'sub-page', 'mt_sublevel_page' );
		add_submenu_page( 'mt-top-level-handle', 'Test Sublevel 2', 'Test Sublevel 2', 'manage_options', 'sub-page2', 'mt_sublevel_page2' );
		add_theme_page( 'With Spaces', 'With Spaces', 'manage_options', 'With Spaces', 'mt_tools_page' );
		add_pages_page( 'Appending Query Arg', 'Test Pages', 'edit_pages', 'testpages', 'mt_pages_page' );

		$expected['testsettings'] = 'http://example.com/wp-admin/options-general.php?page=testsettings';
		$expected['testtools'] = 'http://example.com/wp-admin/tools.php?page=testtools';
		$expected['mt-top-level-handle'] = 'http://example.com/wp-admin/admin.php?page=mt-top-level-handle';
		$expected['sub-page'] = 'http://example.com/wp-admin/admin.php?page=sub-page';
		$expected['sub-page2'] = 'http://example.com/wp-admin/admin.php?page=sub-page2';
		$expected['not_registered'] = '';
		$expected['With Spaces'] = 'http://example.com/wp-admin/themes.php?page=WithSpaces';
		$expected['testpages'] = 'http://example.com/wp-admin/edit.php?post_type=page&#038;page=testpages';

		foreach ($expected as $name => $value) {
			$this->assertEquals( $value, menu_page_url( $name, false ) );
		}

		wp_set_current_user( $current_user );
	}
예제 #19
0
 public function add_pages()
 {
     $write_to_file = apply_filters('write_less_file_log', false);
     if (!$write_to_file) {
         add_management_page('WP LESS', 'WP LESS', 'manage_options', 'wpless', array($this, 'display'));
     }
 }
예제 #20
0
 function admin_menu()
 {
     if (current_user_can('administrator')) {
         $menu = add_management_page(__('Search and Replace', 'pressbooks'), __('Search and Replace', 'pressbooks'), 'administrator', 'search-and-replace', array(&$this, 'admin_screen'));
         add_action('admin_print_scripts-' . $menu, array(&$this, 'js'));
     }
 }
 public static function admin_menu()
 {
     self::$menu_id = add_management_page(esc_html__('WordPress Starter Processor', 'wordpress-starter'), esc_html__('WordPress Starter Processor', 'wordpress-starter'), 'manage_options', self::ID, array(__CLASS__, 'user_interface'));
     add_action('admin_print_scripts-' . self::$menu_id, array(__CLASS__, 'scripts'));
     add_action('admin_print_styles-' . self::$menu_id, array(__CLASS__, 'styles'));
     add_screen_meta_link('wps_settings_link', esc_html__('WordPress Starter Settings', 'wordpress-starter'), admin_url('options-general.php?page=' . WordPress_Starter_Settings::ID), self::$menu_id, array('style' => 'font-weight: bold;'));
 }
예제 #22
0
 /**
  * Va créer une entré BO pour la configuration du Module
  */
 public function createMenuBO()
 {
     //création de la page de configuration
     \add_options_page('LNH Settings', 'LNH Settings', 'manage_options', 'LNH_Settings', array($this, 'pagePluginSettings'));
     //création de la page d'import manuel
     \add_management_page('Import flux LNH', 'Import flux LNH', 'administrator', 'Import_flux_LNH', array($this, 'importPage'));
 }
 function ultimate_admin_menus()
 {
     // Add a new menu under Manage:
     add_management_page('Tag Management', 'Tags', 8, basename(__FILE__), array('UltimateTagWarriorActions', 'ultimate_better_admin'));
     // And one under options
     add_options_page('Tag Options', 'Tags', 8, basename(__FILE__), array('UltimateTagWarriorActions', 'utw_options'));
 }
예제 #24
0
function exploitscanner_menu()
{
    $page_hook = add_management_page('Exploit Scanner', 'Exploit Scanner', 'manage_options', 'exploit-scanner', 'exploitscanner_admin_page');
    $help = '<p><strong>Interpreting the Results</strong></p>
	<p>It is likely that this scanner will find false positives (i.e. files which do not contain malicious code). However, it is best to err
	on the side of caution; if you are unsure then ask in the <a href="http://wordpress.org/support/" target="_blank">Support Forums</a>,
	download a fresh copy of a plugin, search the Internet for similar situations, et cetera. You should be most concerned if the scanner is:
	making matches around unknown external links; finding base64 encoded text in modified core files or the <code>wp-config.php</code> file;
	listing extra admin accounts; or finding content in posts which you did not put there.</p>
	<p>Understanding the three different result levels:</p>
	<ul>
		<li><strong>Severe:</strong> results that are often strong indicators of a hack (though they are not definitive proof)</li>
		<li><strong>Warning:</strong> these results are more commonly found in innocent circumstances than Severe matches, but they should
			still be treated with caution</li>
		<li><strong>Note:</strong> lowest priority, showing results that are very commonly used in legitimate code or notifications about events
			such as skipped files</li>
	</ul>
	
	<p><strong>Help! I think I have been hacked!</strong></p>
	<p>Follow the guides from the Codex:</p>
	<ul>
		<li><a href="http://codex.wordpress.org/FAQ_My_site_was_hacked">Codex: FAQ - My site was hacked</a></li>
		<li><a href="http://codex.wordpress.org/Hardening_WordPress">Codex: Hardening WordPress</a></li>
	</ul>
	<p>Ensure that you change <strong>all</strong> of your WordPress related passwords (site, FTP, MySQL, etc.). A regular backup routine
	(either manual or plugin powered) is extremely useful; if you ever find that your site has been hacked you can easily restore your site from
	a clean backup and fresh set of files and, of course, use a new set of passwords.</p>';
    add_contextual_help($page_hook, $help);
}
예제 #25
0
function bp_checkins_administration_menu()
{
    global $bp, $bp_checkins_manager_admin_page, $bp_checkins_logs_slug;
    if (version_compare(BP_CHECKINS_PLUGIN_VERSION, get_option('bp-checkins-version'), '>')) {
        do_action('bp_checkins_plugin_updated');
    }
    if (!$bp->loggedin_user->is_site_admin) {
        return false;
    }
    $admin_page = bp_checkins_16_new_admin();
    if ($admin_page == 'bp-general-settings.php') {
        $submenu = 'bp-general-settings';
    } else {
        $submenu = $admin_page;
    }
    $bp_checkins_manager_admin_page = add_submenu_page($submenu, __('BP Checkins Settings', 'bp-checkins'), __('BP Checkins Settings', 'bp-checkins'), 'manage_options', 'bp-checkins-admin', 'bp_checkins_settings_admin');
    if (bp_checkins_is_foursquare_ready()) {
        $bp_checkins_logs_slug = 'foursquare-logs';
        if (is_multisite()) {
            $bp_checkins_logs_page = add_submenu_page($submenu, __('Foursquare logs', 'bp-checkins'), __('Foursquare logs', 'bp-checkins'), 'manage_options', $bp_checkins_logs_slug, 'bp_checkins_fs_logs');
        } else {
            $bp_checkins_logs_page = add_management_page(__('Foursquare logs', 'bp-checkins'), __('Foursquare logs', 'bp-checkins'), 'manage_options', $bp_checkins_logs_slug, 'bp_checkins_fs_logs');
        }
    }
    add_action("load-{$bp_checkins_manager_admin_page}", 'bp_checkins_admin_css');
}
예제 #26
0
 public function add_page()
 {
     if (is_plugin_active_for_network(plugin_basename(__FILE__))) {
         add_submenu_page('settings.php', __('WP DB Driver', 'wp-db-driver'), __('WP DB Driver', 'wp-db-driver'), 'manage_options', 'wp-db-driver', array($this, 'page_overview'));
     } else {
         add_management_page(__('WP DB Driver', 'wp-db-driver'), __('WP DB Driver', 'wp-db-driver'), 'manage_options', 'wp-db-driver', array($this, 'page_overview'));
     }
 }
예제 #27
0
파일: menu.php 프로젝트: crazyyy/smartmagel
/**
 * Add the backups menu item
 * to the tools menu
 *
 * @return null
 */
function hmbkp_admin_menu()
{
    if (is_multisite()) {
        add_submenu_page('settings.php', __('Manage Backups', 'backupwordpress'), __('Backups', 'backupwordpress'), defined('HMBKP_CAPABILITY') && HMBKP_CAPABILITY ? HMBKP_CAPABILITY : 'manage_options', HMBKP_PLUGIN_SLUG, 'hmbkp_manage_backups');
    } else {
        add_management_page(__('Manage Backups', 'backupwordpress'), __('Backups', 'backupwordpress'), defined('HMBKP_CAPABILITY') && HMBKP_CAPABILITY ? HMBKP_CAPABILITY : 'manage_options', HMBKP_PLUGIN_SLUG, 'hmbkp_manage_backups');
    }
}
예제 #28
0
 function add_page()
 {
     if (current_user_can('level_10') && function_exists('add_management_page')) {
         $hook = add_management_page('Reset WP', 'Reset WP', 'level_10', 'reset-wp', array(&$this, 'admin_page'));
     }
     add_action("admin_print_scripts-{$hook}", array(&$this, 'admin_javascript'));
     add_action("admin_footer-{$hook}", array(&$this, 'footer_javascript'));
 }
예제 #29
0
 /**
  * Registers site options page in admin menu.
  *
  * @since 4.0.0
  * @action admin_menu
  *
  * @access public
  */
 public function add_site_options_page()
 {
     if ($this->_wpdb->blogid > 1 && $this->_plugin->is_site_permitted()) {
         $title = __('Domain Mapping', 'domainmap');
         $this->_admin_page = add_management_page($title, $title, 'manage_options', 'domainmapping', array($this, 'render_site_options_page'));
         $this->_register_wpmudev_notices();
     }
 }
예제 #30
0
function elfinder_pages()
{
    add_management_page('elFinder', 'elfinder', 'manage_options', 'elfinder', 'elfinder_mount_tools');
    $page = add_options_page(__('elFinder Settings', 'elfinder'), 'elfinder', 'manage_options', 'elfinder', 'elfinder_mount_settings');
    /* Using registered $page handle to hook script load */
    add_action('admin_print_scripts-' . $page, 'wpelf_admin_js');
    add_action('admin_print_styles-' . $page, 'wpelf_admin_styles');
}