Пример #1
0
function mt_add_pages()
{
    $custombranding_admin = add_options_page('Custom Admin Branding', 'Custom Admin Branding', 8, 'brandingoptions', 'admin_branding_options_page');
    //add help instructions for WordPress sliding help menu
    $admin_branding_help = "\r\n<style>\r\nh6 {\r\n\tfont-size:0.85em;\r\n\tborder-bottom:1px solid #d1d1d1;\r\n\tpadding-bottom:3px;\r\n\tmargin:2.33em 0 10px;}\r\n\r\nul.help_list {\r\n\tmargin-top:10px;}\r\n\t\r\nul.help_list li {\r\n\tlist-style-type:disc;\r\n\tmargin-left:20px;}\r\n</style>\r\n\r\n<p>Well, you obviously have the plugin activated so thats out of the way.  Now on to the customization of your WordPress Admin.</p>\r\n<p>Nearly every visual feature in the login screen, header section, and footer section can be modified to fit your custom color and image scheme.</p>\r\n\r\n<h6>Changing Colors</h6>\r\n<p>The options that support color change have a swatch next to the form field.  You can either click the color swatch or click into the form field.  Doing so will bring up a palette of color options.  You are not restricited by the choices in the palette.  You can enter any 6 figure hexidecimal color code.  You must however precede your code with the pound sign (#).</p>\r\n\r\n<h6>Customizing Images</h6>\r\nThere are five images that you can customize:\r\n<ul class='help_list'>\r\n\t<li>Login Form Background</li>\r\n\t<li>Login Form Login Button Background</li>\r\n\t<li>Admin Header Logo</li>\r\n\t<li>Favorite Actions Button Background</li>\r\n\t<li>Footer Logo</li>\r\n</ul>\r\n\r\n<p>All of the default images are in the images folder which is in the custom-admin-branding plugin folder.\r\nTo change an image:</p>\r\n<ol>\r\n\t<li>Create your custom images with the provided Photoshop templates. (They are in the psd_image_templates folder)</li>\r\n\t<li>Upload your custom image(s) to the images folder.</li>\r\n\t<li>Enter the file name of the image you wish to use in the proper form field in the options page.</li>\r\n\t<li>Click the save changes button at the bottom of options page and you will see your changes immediately.</li>\r\n</ol>\r\n\r\n<p>*********Important***********</p>\r\nTo avoid having your custom images overwritten when you upgrade the plugin, you'll need to name them something different than the default names which are:\r\n<ul class='help_list'>\r\n\t<li>wordpress_blue.jpg</li>\r\n\t<li>button-grad.png</li>\r\n\t<li>logo_wordpress_gray.png</li>\r\n\t<li>fav.png</li>\r\n\t<li>footer_wordpress_gray.png</li>\r\n</ul>\r\n\r\n\r\n<h6>Advanced Header Customization</h6>\r\n<p>The form field for the Admin Header Background Color will accept a full css properties for the background selector.  So if you wanted to have a repeating image for your admin header you would enter in:<br />\r\n<blockquote>transparent url(http://yoursitename.com/wp-content/plugins/custom-admin-branding/images/header_bg_wordpress_gray.png) repeat-x</blockquote></p>\r\n\r\n<h6>Changing the Admin Footer Link</h6>\r\n<p>You can have the image in the footer link back to your site, another site, or no site if you wish.  Just fill in full url in the Footer Link form field.</p>\r\n\r\n";
    add_contextual_help($custombranding_admin, $admin_branding_help);
}
Пример #2
0
function capa_add_pages()
{
    // Rolle/User -> no manage options right -> No go
    if (!current_user_can('manage_options')) {
        return NULL;
    }
    global $menu;
    // Add CaPa CSS Style
    wp_enqueue_style('capa', plugins_url($path = '/capa/css/capa-style.css'), array());
    wp_enqueue_script('capa', plugins_url($path = '/capa/js/capa.js'), array());
    // DEV Variable
    define('CAPA_DBUG', FALSE);
    $menu_slug = CAPA_DBUG ? __FILE__ : 'capa/capa-options';
    /**
    	TODO 
    	- 26.0001 verhindert, dass ein anderes Plugin den Platz stiehlt. - Notloesung; Aendern
    */
    // Add Capa Separator
    $menu['26.0001'] = array('', 'manage_options', 'separator-capa', '', 'wp-menu-separator');
    // Add CaPa Menu ( after the CaPa Separator and before Appearance) :
    add_menu_page(__('CaPa', 'capa'), 'CaPa', 'manage_options', $menu_slug, 'capa_global_page', 'div', '26.0002');
    // Global Subpage
    $page['global'] = add_submenu_page($menu_slug, __('CaPa &rsaquo; General Settings', 'capa'), __('CaPa Settings', 'capa'), 'manage_options', $menu_slug, 'capa_global_page');
    // Roles Subpage
    $page['roles'] = add_submenu_page($menu_slug, __('CaPa &rsaquo; User Roles', 'capa'), __('User Roles', 'capa'), 'manage_options', 'capa/capa-roles-page', 'capa_sublevel_roles');
    // Support Subpage
    $page['help'] = add_submenu_page($menu_slug, __('CaPa &rsaquo; Support', 'capa'), __('CaPa Support', 'capa'), 'manage_options', 'capa/capa-support-page', 'capa_sublevel_support');
    // Add Help
    if (function_exists('add_contextual_help')) {
        add_contextual_help($page['global'], '<br />' . @file_get_contents(WP_PLUGIN_DIR . "/capa/help/global." . (WPLANG == '' ? 'EN' : (file_exists(WP_PLUGIN_DIR . "/capa/help/global." . strtoupper(substr(WPLANG, 0, 2))) ? strtoupper(substr(WPLANG, 0, 2)) : 'EN')), "r"));
        add_contextual_help($page['roles'], '<br />' . @file_get_contents(WP_PLUGIN_DIR . "/capa/help/roles." . (WPLANG == '' ? 'EN' : (file_exists(WP_PLUGIN_DIR . "/capa/help/roles." . strtoupper(substr(WPLANG, 0, 2))) ? strtoupper(substr(WPLANG, 0, 2)) : 'EN')), "r"));
        add_contextual_help($page['help'], '<br />' . @file_get_contents(WP_PLUGIN_DIR . "/capa/help/help." . (WPLANG == '' ? 'EN' : (file_exists(WP_PLUGIN_DIR . "/capa/help/help." . strtoupper(substr(WPLANG, 0, 2))) ? strtoupper(substr(WPLANG, 0, 2)) : 'EN')), "r"));
    }
}
Пример #3
0
 public function register_menu()
 {
     add_action('admin_init', array(&$this, 'register_options'));
     if (isset($this->help)) {
         add_contextual_help(get_plugin_page_hookname($this->slug, ''), $this->help);
     }
 }
Пример #4
0
 /**
  * Set up the enqueue for the CSS & JavaScript files.
  *
  * @since 3.0.0
  */
 function admin_load()
 {
     add_contextual_help($this->page, '<p>' . __('You can customize the look of your site without touching any of your theme&#8217;s code by using a custom background. Your background can be an image or a color.') . '</p>' . '<p>' . __('To use a background image, simply upload it, then choose your display options below. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.') . '</p>' . '<p>' . __('You can also choose a background color. If you know the hexadecimal code for the color you want, enter it in the Color field. If not, click on the Select a Color link, and a color picker will allow you to choose the exact shade you want.') . '</p>' . '<p>' . __('Don&#8217;t forget to click on the Save Changes button when you are finished.') . '</p>');
     get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Background_Screen" target="_blank">Documentation on Custom Background</a>') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>');
     wp_enqueue_script('custom-background');
     wp_enqueue_style('farbtastic');
 }
Пример #5
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());
}
Пример #6
0
function add_post_views_contextual_help()
{
    add_contextual_help('dashboard_page_post-views', '<p><strong>Donation:</strong></p> 
   		<p>PayPal Account ( Global ): <a href="https://www.paypal.com/" target="_blank"> message@ziming.org</a>
   		&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; AliPay Account ( China ): <a href="https://www.alipay.com//" target="_blank"> message@ziming.org</a></p>
   	');
}
/**
 * Initializes all the theme settings page functionality. This function is used to create the theme settings 
 * page, then use that as a launchpad for specific actions that need to be tied to the settings page.
 *
 * @since 0.7.0
 * @global string $hybrid The global theme object.
 */
function hybrid_settings_page_init()
{
    global $hybrid;
    /* Get theme information. */
    $theme = hybrid_get_theme_data();
    $prefix = hybrid_get_prefix();
    $domain = hybrid_get_textdomain();
    /* Register theme settings. */
    register_setting("{$prefix}_theme_settings", "{$prefix}_theme_settings", 'hybrid_save_theme_settings');
    /* Create the theme settings page. */
    $hybrid->settings_page = add_theme_page(sprintf(esc_html__('%1$s Theme Settings', $domain), $theme['Name']), esc_html__('Theme Settings', $domain), hybrid_settings_page_capability(), 'theme-settings', 'hybrid_settings_page');
    /* Check if the settings page is being shown before running any functions for it. */
    if (!empty($hybrid->settings_page)) {
        /* Filter the settings page capability so that it recognizes the 'edit_theme_options' cap. */
        add_filter("option_page_capability_{$prefix}_theme_settings", 'hybrid_settings_page_capability');
        /* Add contextual help to the theme settings page. */
        add_contextual_help($hybrid->settings_page, hybrid_settings_page_contextual_help());
        /* Load the theme settings meta boxes. */
        add_action("load-{$hybrid->settings_page}", 'hybrid_load_settings_page_meta_boxes');
        /* Create a hook for adding meta boxes. */
        add_action("load-{$hybrid->settings_page}", 'hybrid_settings_page_add_meta_boxes');
        /* Load the JavaScript and stylesheets needed for the theme settings screen. */
        add_action('admin_enqueue_scripts', 'hybrid_settings_page_enqueue_scripts');
        add_action('admin_enqueue_scripts', 'hybrid_settings_page_enqueue_styles');
        add_action("admin_head-{$hybrid->settings_page}", 'hybrid_settings_page_load_scripts');
    }
}
Пример #8
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);
}
Пример #9
0
/**
 * Add the theme options page to the admin menu.
 *
 * Function attached to the admin_menu action hook.
 */
function mandisphotography_theme_options_add_page()
{
    $theme_page = add_theme_page('Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'theme_options_render_page');
    if (!$theme_page) {
        return;
    }
    $help = '<p>Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Mandi\'s Photography, provides the following Theme Options:"</p>' . '<ol>' . '<li><strong>Facebook Link</strong>: You can add your Facebook page link and have the Facebook icon in the footer link to it.</li>' . '</ol>' . '<p>Remember to clic "Save Changes" to save any changes you have made to the theme options.</p>';
    add_contextual_help($theme_page, $help);
}
function jqmobile_theme_options_add_page()
{
    $theme_page = add_theme_page(__('Theme Options', 'jqmobile'), __('Theme Options', 'jqmobile'), 'edit_theme_options', 'theme_options', 'jqmobile_theme_options_render_page');
    if (!$theme_page) {
        return;
    }
    $help = '<p>' . __('Your current theme, jQMobile, provides Basic and Advanced settings. See descriptions below.', 'jqmobile') . '</p>' . '<p><strong>Basic Settings</strong></p>' . '<ol>' . '<li>' . __('<strong>Color Scheme</strong>: Here you can choose one of the available color schemes for your website. By default three schemes are available: "Default", "Valencia" and "Green".', 'jqmobile') . '</li>' . '<li>' . __('<strong>Upload Scheme</strong>: Optionally you may create your own color scheme using <a href="http://jquerymobile.com/themeroller/" target="_blank">ThemeRoller Mobile</a>. Once your custom scheme is created and downloaded you may upload it here by clicking "Upload" button.', 'jqmobile') . '</li>' . '<li>' . __('<strong>Mobile Layout</strong>: Here you may control the position of the sidebar. It can be left- or right-side aligned.', 'jqmobile') . '</li>' . '</ol>' . '<p><strong>' . __('Advanced Settings', 'jqmobile') . '</strong></p>' . '<p>' . __('You may use advanced settings for tuning up your custom created color scheme downloaded from <a href="http://jquerymobile.com/themeroller/" target="_blank">ThemeRoller Mobile</a>.', 'jqmobile') . '</p>' . '<p>' . __('ThemeRoller Mobile allows you to create up to 26 unique color "swatches" marked by letters from "a" to "z". Each swatch defines the look and feel for a bar, content block and a button with normal, hover and pressed interaction states. Within your site, you may assign swatch letters to the elements on a page to mix and match swatch colors for really rich designs. The elements available for customizing are: "Header", "Body", "Footer", "Post Teaser", "Sticky Post", "Widget", "Widget Content", "Comments" and "Comment Form".', 'jqmobile') . '</p>' . '<p>' . __('Don\'t forget to click "Save Changes" to save all the updates have made to the jQMobile theme options.', 'jqmobile') . '</p>' . '<p><strong>' . __('For more information:', 'jqmobile') . '</strong></p>' . '<p>' . __('<a href="http://jquerymobile.com/" target="_blank">jQuery Mobile</a>', 'jqmobile') . '</p>' . '<p>' . __('<a href="http://jquerymobile.com/themeroller/" target="_blank">ThemeRoller</a>', 'jqmobile') . '</p>' . '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'jqmobile') . '</p>';
    add_contextual_help($theme_page, $help);
}
Пример #11
0
function wpm_add_pages()
{
    add_menu_page('Manual', 'Manual', 0, __FILE__, 'wpm_toplevel_page', plugins_url('video-user-manuals/images/vum-logo.png'));
    add_submenu_page(__FILE__, 'Videos', 'Videos', 0, __FILE__, 'wpm_toplevel_page');
    add_submenu_page(__FILE__, 'User Manual', 'User Manual', 0, 'online-manual', 'wpm_online_manual');
    $wpm_administration = add_submenu_page(__FILE__, 'Manual Options', 'Manual Options', 10, 'manual-options', 'wpm_admin');
    $wpm_help = "\n\t<style>\n\tul.help_list {\n\t\tmargin-top:10px;}\n\t\t\n\tul.help_list li {\n\t\tlist-style-type:disc;\n\t\tmargin-left:20px;}\n\t</style>\n\t\t\n\t<p>For more details of how to use this plugin please refer to our FAQ section.  <a href=\"http://www.videousermanuals.com/faq/\">http://www.videousermanuals.com/faq/</a></p>\n\t\n\t<p>In order to use this plugin, you must have a serial number, which should have been emailed to you when you first subscribed to the plugin.</p>\n\t\n\t<p>If you have any issues with the plugin, please put in a support ticket: <a href=\"http://www.videousermanuals.com/support-desk/\">http://www.videousermanuals.com/support-desk/</a>.</p>\n\t\n\t<p style=\"font-size:9px; margin-bottom:10px;\">Icons: <a href=\"http://www.woothemes.com/2009/09/woofunction/\">WooFunction</a></p>\t\n\t\n\t<p>Please note the links below are not actually related to this plugin (we could not figure out how to remove them. If anyone knows how to, please let us know!)</p>\n\t";
    add_contextual_help($wpm_administration, $wpm_help);
}
Пример #12
0
/**
 * Add our theme options page to the admin menu, including some help documentation.
 * This function is attached to the admin_menu action hook.
 */
function dusktodawn_theme_options_add_page()
{
    $theme_page = add_theme_page(__('Theme Options', 'dusktodawn'), __('Theme Options', 'dusktodawn'), 'edit_theme_options', 'theme_options', 'theme_options_render_page');
    if (!$theme_page) {
        return;
    }
    $help = '<p>' . __('Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Dusk To Dawn, provides the following Theme Options:', 'dusktodawn') . '</p>' . '<ol>' . '<li>' . __('<strong>Accent Color</strong>: You can choose the color used for text links and the top line on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'dusktodawn') . '</li>' . '<li>' . __('<strong>Layout</strong>: You can choose if you want your site&#8217;s layout to have a sidebar on the left, or the right.', 'dusktodawn') . '</li>' . '</ol>' . '<p>' . __('Remember to click "Save Changes" to save any changes you have made to the theme options.', 'dusktodawn') . '</p>' . '<p><strong>' . __('For more information:', 'dusktodawn') . '</strong></p>' . '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'dusktodawn') . '</p>' . '<p>' . __('<a href="http://wordpress.com/support/" target="_blank">Support Forums</a>', 'dusktodawn') . '</p>';
    add_contextual_help($theme_page, $help);
}
Пример #13
0
/**
 * Add our theme options page to the admin menu, including some help documentation.
 *
 * This function is attached to the admin_menu action hook.
 *
 * @since Twenty Eleven 1.0
 */
function twentyeleven_theme_options_add_page()
{
    $theme_page = add_theme_page(__('Theme Options', 'twentyeleven'), __('Theme Options', 'twentyeleven'), 'edit_theme_options', 'theme_options', 'twentyeleven_theme_options_render_page');
    if (!$theme_page) {
        return;
    }
    $help = '<p>' . __('Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven') . '</p>' . '<ol>' . '<li>' . __('<strong>Color Scheme</strong>: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven') . '</li>' . '<li>' . __('<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven') . '</li>' . '<li>' . __('<strong>Default Layout</strong>: You can choose if you want your site&#8217;s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven') . '</li>' . '</ol>' . '<p>' . __('Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven') . '</p>' . '<p><strong>' . __('For more information:', 'twentyeleven') . '</strong></p>' . '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven') . '</p>';
    add_contextual_help($theme_page, $help);
}
/**
 * Setup admin menus for Shibboleth options.
 *
 * @action: admin_menu
 **/
function shibboleth_admin_panels()
{
    // global options page
    if (function_exists('is_site_admin')) {
        $hookname = add_submenu_page('settings.php', __('Shibboleth Options', 'shibboleth'), __('Shibboleth', 'shibboleth'), 8, 'shibboleth-options', 'shibboleth_options_page');
    } else {
        $hookname = add_options_page(__('Shibboleth options', 'shibboleth'), __('Shibboleth', 'shibboleth'), 8, 'shibboleth-options', 'shibboleth_options_page');
    }
    add_contextual_help($hookname, shibboleth_help_text());
}
Пример #15
0
 /**
  * screen_help()
  * 
  * Handles the screen() help
  */
 function screen_help()
 {
     global $current_screen;
     // If it's not Courseware Screen
     if (!stristr($current_screen->id, 'courseware')) {
         return;
     }
     $vars['name'] = 'contextual_help';
     add_contextual_help($current_screen, self::load_template($vars));
 }
Пример #16
0
 /**
  * Adding the menu in the admin
  *
  * @todo Add a more descriptive help
  */
 function TopMenu()
 {
     global $mf_domain;
     // Add top menu
     /**
      * For now this menu is only displayed for the admin user, i think to this will change soon 
      */
     $post_type_screen = add_submenu_page('MagicFieldsMenu', __('Post Types', $mf_domain), __('Post types', $mf_domain), 10, 'mf_posttypes', array('MF_PostTypePages', 'Dispacher'));
     add_contextual_help($post_type_screen, '<p>' . __('Hi you can create and manage Post Types here') . '</p>');
 }
Пример #17
0
function bp_chat_add_network_admin_menu()
{
    global $bp;
    if (!$bp->loggedin_user->is_site_admin) {
        return false;
    }
    $menutitle = __('Chat Settings', 'bp-chat');
    $pagehook = add_submenu_page('bp-general-settings', __('Chat Settings', 'bp-chat'), $menutitle, 'manage_options', 'bp-chat-admin', 'bp_chat_network_admin');
    add_contextual_help($pagehook, __('<a href="http://wordpress.org/extend/plugins/buddypress-ajax-chat/">Documentation</a>', 'bp-chat'));
}
Пример #18
0
 /**
  * Creates an options page for this controller's model using $this->_submnu
  * this is the callback from the 'admin_menu' hook set in self::add_options_page() 
  * @since 0.1
  */
 public function add_settings_page()
 {
     // add the settings page and store it in a variable
     $submenu = add_submenu_page($this->_model->admin_page, $this->_model->title, $this->_model->title, $this->_model->capability, $this->_model->name, array($this, 'render_settings_page'));
     // add contextual help to the settings page if it's specified in the model
     if ($this->model->help) {
         add_contextual_help($submenu, $this->model->help);
     }
     // add a hook to run only when we're on the settings page
     add_action('load-' . $submenu, array($this, 'on_settings_page'));
 }
Пример #19
0
function st_menu_setting_help()
{
    $help = '<p>' . __('Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven') . '</p>' . '<ol>' . '<li>' . __('<strong>Color Scheme</strong>: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven') . '</li>' . '<li>' . __('<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven') . '</li>' . '<li>' . __('<strong>Default Layout</strong>: You can choose if you want your site&#8217;s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven') . '</li>' . '</ol>' . '<p>' . __('Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven') . '</p>';
    $sidebar = '<p><strong>' . __('For more information:', 'twentyeleven') . '</strong></p>' . '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven') . '</p>';
    $screen = get_current_screen();
    if (method_exists($screen, 'add_help_tab')) {
        // WordPress 3.3
        $screen->add_help_tab(array('title' => __('Overview', 'twentyeleven'), 'id' => 'theme-options-help', 'content' => $help));
        $screen->set_help_sidebar($sidebar);
    } else {
        // WordPress 3.2
        add_contextual_help($screen, $help . $sidebar);
    }
}
Пример #20
0
function onemozilla_theme_options_help()
{
    $help = '<p>' . __('Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, One Mozilla, provides the following Theme Options:', 'onemozilla') . '</p>' . '<ol>' . '<li>' . __('<strong>Color Scheme</strong>: You can choose from a few different color schemes: “Sand” (orange-tan background) is suitable for most Mozilla blogs. “Sky” (light blue/gray background) suitable for Firefox-related blogs. “Obsidian” is a light-on-dark scheme. “Stone” is the default scheme, a light, neutral gray.', 'onemozilla') . '</li>' . '</ol>' . '<p>' . __('Remember to click “Save Changes” to save any changes you have made to the theme options.', 'onemozilla') . '</p>';
    $sidebar = '<p><strong>' . __('For more information:', 'onemozilla') . '</strong></p>' . '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'onemozilla') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'onemozilla') . '</p>';
    $screen = get_current_screen();
    if (method_exists($screen, 'add_help_tab')) {
        // WordPress 3.3
        $screen->add_help_tab(array('title' => __('Overview', 'onemozilla'), 'id' => 'theme-options-help', 'content' => $help));
        $screen->set_help_sidebar($sidebar);
    } else {
        // WordPress 3.2
        add_contextual_help($screen, $help . $sidebar);
    }
}
 function eshop_helptab($screen, $help)
 {
     $my_add_contextual_help_id = 0;
     if (is_string($screen)) {
         $screen = convert_to_screen($screen);
     }
     if (method_exists($screen, 'add_help_tab')) {
         // WordPress 3.3
         $my_add_contextual_help_id++;
         $screen->add_help_tab(array('title' => __('eShop Help', 'eshop'), 'id' => 'eshophelptab' . $my_add_contextual_help_id, 'content' => $help));
     } elseif (function_exists('add_contextual_help')) {
         // WordPress 3.2
         add_contextual_help($screen, $help);
     }
 }
Пример #22
0
function roots_options_add_menu()
{
    $settings_output = roots_get_settings();
    // collect our contextual help text
    $roots_contextual_help = $settings_output['roots_contextual_help'];
    // Display Settings Page link under the "Appearance" Admin Menu
    // add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function);
    $roots_options_page = add_menu_page(__('Site Settings'), __('Site Settings', 'roots_textdomain'), 'level_7', roots_base, 'roots_options_page_fn', '', 54);
    // contextual help
    if ($roots_options_page) {
        add_contextual_help($roots_options_page, $roots_contextual_help);
    }
    // css & js
    add_action('load-' . $roots_options_page, 'roots_options_scripts');
}
Пример #23
0
    function on_admin_menu()
    {
        //add our own option page, you can also add it to different sections or use your own one
        $this->pagehook = add_options_page(__('eShop Settings', 'eshop'), __('eShop', 'eshop'), 'eShop_admin', ESHOP_SETTINGS_PAGE_NAME, array(&$this, 'on_show_page'));
        //register  callback gets call prior your own page gets rendered
        add_action('load-' . $this->pagehook, array(&$this, 'on_load_page'));
        add_action('load-' . $this->pagehook, array(&$this, 'on_load_page_scripts'));
        $help = '
		<p><strong>' . __('eShop help:') . '</strong></p>
		<ul>
		<li>' . __('<a href="http://quirm.net/wiki/eshop/">eShop Wiki</a>', 'eshop') . '</li>
		<li>' . __('<a href="http://wordpress.org/tags/eshop">Wordpress forums</a>', 'eshop') . '</li>
		<li>' . __('<a href="http://quirm.net/forum/forum.php?id=14">Quirm.net</a>', 'eshop') . '</li>
		</ul>';
        if ($this->pagehook != '') {
            add_contextual_help($this->pagehook, $help);
        }
    }
function custom_admin_branding_add_pages()
{
    $custombranding_admin = add_options_page('Custom Admin Branding', 'Custom Admin Branding', 8, 'brandingoptions', 'admin_branding_options_page');
    /*********************************************
     Add settings link on plugin page
    *********************************************/
    function your_plugin_settings_link($links)
    {
        $settings_link = '<a href="options-general.php?page=brandingoptions">Settings</a>';
        array_unshift($links, $settings_link);
        return $links;
    }
    $plugin = plugin_basename(__FILE__);
    add_filter("plugin_action_links_{$plugin}", 'your_plugin_settings_link');
    /*********************************************
     Add help instructions for WordPress sliding help menu
    *********************************************/
    $admin_branding_help = "\n<style>\nh6 {\n\tfont-size:0.85em;\n\tborder-bottom:1px solid #d1d1d1;\n\tpadding-bottom:3px;\n\tmargin:2.33em 0 10px;}\n\nul.help_list {\n\tmargin-top:10px;}\n\t\nul.help_list li {\n\tlist-style-type:disc;\n\tmargin-left:20px;}\n</style>\n\n<p>Well, you obviously have the plugin activated so thats out of the way.  Now on to the customization of your WordPress Admin.</p>\n<p>Nearly every visual feature in the login screen, header section, and footer section can be modified to fit your custom color and image scheme.</p>\n\n<h6>Changing Colors</h6>\n<p>The options that support color change have a swatch next to the form field.  You can either click the color swatch or click into the form field.  Doing so will bring up a palette of color options.  You are not restricted by the choices in the palette.  You can enter any 6 figure hexidecimal color code.  You must however precede your code with the pound sign (#).</p>\n\n<h6>Customizing Images</h6>\nThere are four images that you can customize:\n<ul class='help_list'>\n\t<li>Login Form Background</li>\n\t<li>Login Form Login Button Background</li>\n\t<li>Admin Header Logo</li>\n\t<li>Footer Logo</li>\n</ul>\n\n<p>All of the default images are in the images folder which is in the custom-admin-branding plugin folder.\nTo change an image:</p>\n<ol>\n\t<li>Create your custom images with the provided Photoshop templates. (They are in the psd_image_templates folder)</li>\n\t<li>Upload your custom image(s) with the built in WordPress uploader.</li>\n\t<li>After your image is uploaded click the insert in post button or copy and paste the file url in image field</li>\n\t<li>Click the save changes button at the bottom of options page and you will see your changes immediately.</li>\n</ol>\n\n\n<p>Please note that the optimal size for the header logo is 32px by 32px.  You may have an image longer than 32px but not higher as it will break the layout.  If your image is longer than 32px please enter the width of the image in the supplied field.</p>\n\n\n<h6>Changing the Admin Footer Content</h6>\n<p>The custom footer is designed for you to put your logo and some helpful information for your client.  The optimal image size is 32px by 32px.</p>\n\n<p>The footer text field will accept all text and most html.  I use this area to point a link back to my site or a support page for my clients.</p>\n\n<h6>Custom CSS</h6>\n<p>A new feature is the ability to add your own custom css.  This field can be used to change any css rule present in the admin.  These will not apply to the login page however.</p>\n";
    add_contextual_help($custombranding_admin, $admin_branding_help);
}
Пример #25
0
    /**
     * used by the admin panel hook
     */
    function eshop_admin()
    {
        global $wp_version;
        $page[] = add_menu_page(__('eShop', 'eshop'), __('eShop', 'eshop'), 'eShop', 'eshop-orders.php', 'eshop_admin_orders', WP_PLUGIN_URL . '/eshop/eshop.png');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop Orders', 'eshop'), __('Orders', 'eshop'), 'eShop_admin', basename('eshop-orders.php'), 'eshop_admin_orders');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop Shipping', 'eshop'), __('Shipping', 'eshop'), 'eShop_admin', basename('eshop-shipping.php'), 'eshop_admin_shipping');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop Products', 'eshop'), __('Products', 'eshop'), 'eShop', basename('eshop-products.php'), 'eshop_admin_products');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop Options', 'eshop'), __('Option Sets', 'eshop'), 'eShop', basename('eshop-options.php'), 'eshop_admin_options');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop Downloads', 'eshop'), __('Downloads', 'eshop'), 'eShop_admin', basename('eshop-downloads.php'), 'eshop_admin_downloads');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop Discount Codes', 'eshop'), __('Discount Codes', 'eshop'), 'eShop_admin', basename('eshop-discount-codes.php'), 'eshop_discount_codes');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop Base', 'eshop'), __('Base', 'eshop'), 'eShop_admin', basename('eshop-base.php'), 'eshop_admin_base');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop Email Templates', 'eshop'), __('Emails', 'eshop'), 'eShop_admin', basename('eshop-templates.php'), 'eshop_admin_templates');
        $page[] = add_submenu_page('eshop-orders.php', __('eShop About', 'eshop'), __('About &amp; Help', 'eshop'), 'eShop', basename('eshop-about.php'), 'eshop_admin_about');
        if (eshop_wp_version('3')) {
            $page[] = add_users_page(__('eShop Orders', 'eshop'), __('My Orders', 'eshop'), 'read', basename('my-orders.php'), 'eshop_user_orders');
        }
        //only add if you can edit it!
        if (@(!file_exists(get_stylesheet_directory() . '/eshop.css'))) {
            $page[] = add_theme_page(__('eShop Style', 'eshop'), __('eShop', 'eshop'), 'eShop_admin', basename('eshop-style.php'), 'eshop_admin_style');
        }
        $page[] = add_submenu_page('plugins.php', __('eShop Uninstall', 'eshop'), __('eShop Uninstall', 'eshop'), 'eShop_admin', basename('eshop-uninstall.php'), 'eshop_admin_uninstall');
        $help = '
		<p><strong>' . __('eShop Help', 'eshop') . '</strong></p>
		<ul>
		<li>' . __('<a href="http://quirm.net/wiki/eshop/">eShop Wiki</a>', 'eshop') . '</li>
		<li>' . __('<a href="http://wordpress.org/tags/eshop">Wordpress forums</a>', 'eshop') . '</li>
		<li>' . __('<a href="http://quirm.net/forum/forum.php?id=14">Quirm.net</a>', 'eshop') . '</li>
		</ul>';
        foreach ($page as $paged) {
            add_action('admin_print_styles-' . $paged, 'eshop_admin_styles');
            if ($paged != 'users_page_my_orders' && $paged != '') {
                add_contextual_help($paged, $help);
            }
        }
        if (is_admin()) {
            include WP_PLUGIN_DIR . '/eshop/user.php';
        }
    }
Пример #26
0
 function networks_admin_menu()
 {
     if (function_exists('is_network_admin')) {
         /** WP >= 3.1 */
         $this->admin_page = add_submenu_page('sites.php', __('Networks', 'njsl-networks'), __('Networks', 'njsl-networks'), 'manage_network_options', $this->slug, array(&$this, 'sites_page'));
         $this->listPage = 'sites.php?page=' . $this->slug;
         $this->sitesPage = 'sites.php';
     } else {
         /** WP < 3.1	*/
         $this->admin_page = add_submenu_page('ms-admin.php', __('Networks', 'njsl-networks'), __('Networks', 'njsl-networks'), 'manage_options', $this->slug, array(&$this, 'sites_page'));
         $this->listPage = 'ms-admin.php?page=' . $this->slug;
         $this->sitesPage = 'ms-sites.php';
     }
     /** Help for WP < 3.3 */
     global $wp_version;
     if (version_compare($wp_version, '3.3', '<')) {
         add_contextual_help($this->admin_page, $this->networks_help());
     }
     add_action('load-' . $this->admin_page, array(&$this, 'networks_help_screen'));
     add_action('load-' . $this->admin_page, array(&$this, 'networks_options_screen'));
     add_action('admin_print_scripts-' . $this->admin_page, array(&$this, 'add_admin_scripts'));
     add_action('admin_print_styles-' . $this->admin_page, array(&$this, 'add_admin_styles'));
 }
 /**
  * @see Controller::render()
  */
 protected function render($viewPath = NULL)
 {
     // assume template file name depending on calling function
     if (is_null($viewPath)) {
         $trace = debug_backtrace();
         $viewPath = str_replace('_', '/', preg_replace('%^' . preg_quote(PMWI_Plugin::PREFIX, '%') . '%', '', strtolower($trace[1]['class']))) . '/' . $trace[1]['function'];
     }
     // render contextual help automatically
     $viewHelpPath = $viewPath;
     // append file extension if not specified
     if (!preg_match('%\\.php$%', $viewHelpPath)) {
         $viewHelpPath .= '.php';
     }
     $viewHelpPath = preg_replace('%\\.php$%', '-help.php', $viewHelpPath);
     $fileHelpPath = PMWI_Plugin::ROOT_DIR . '/views/' . $viewHelpPath;
     if (is_file($fileHelpPath)) {
         // there is help file defined
         ob_start();
         include $fileHelpPath;
         add_contextual_help(PMWI_Plugin::getInstance()->getAdminCurrentScreen()->id, ob_get_clean());
     }
     parent::render($viewPath);
 }
Пример #28
0
 /**
  * Function to add contextual help for each menu of plugin page.
  * @return contextual help content
  * @author Praveen
  */
 function add_gallery_contextual_help()
 {
     $help_array = array('toplevel_page_cvg-gallery-overview', 'video-gallery_page_cvg-gallery-add', 'video-gallery_page_cvg-gallery-manage', 'video-gallery_page_cvg-gallery-details', 'video-gallery_page_cvg-gallery-sort', 'video-gallery_page_cvg-gallery-settings', 'video-gallery_page_cvg-player-settings', 'video-gallery_page_cvg-plugin-uninstall', 'video-gallery_page_cvg-video-sitemap');
     foreach ($help_array as $help) {
         switch ($help) {
             case 'toplevel_page_cvg-gallery-overview':
                 $help_content = '<p><strong>Cool Video Gallery - Overview</strong></p>';
                 $help_content .= '<p>This page shows a brief about the total number of gallery and videos added using this plugin. Server information is also provided to denote the maximum file upload limit of PHP. Inaddition to this it shows whether <b>FFMPEG</b> is installed in the webserver. Preview images are automatically generated for videos added if FFMPEG is installed. Otherwise images should be manually uploaded for videos added.</p>';
                 $help_content .= '<p><b>Instructions to use <i>Cool Video Gallery</i>:</b></p>';
                 $help_content .= '<p><ol><li> Add a gallery and upload some videos from the admin panel to that gallery.</li>' . '<li>Use either `<b>CVG Slideshow</b>` or `<b>CVG Showcase</b>` widget to play slideshow of uploaded videos in a gallery.</li>' . '<li>Go to your post/page and enter the tag `<b>[cvg-video videoId=\'</b>vid<b>\' /]</b>` (where vid is video id) to add video ' . 'or enter the tag `<b>[cvg-gallery galleryId=\'</b>gid<b>\' /]</b>` (where gid is gallery id) to add a complete gallery.</li>' . '<li>Inorder to use slideshow and showcase in custom templates created use the function `<b>cvgShowCaseWidget(</b>gid<b>)</b>` and `<b>cvgSlideShowWidget(</b>gid<b>)</b>` (where gid is gallery id).</li></ol></p>';
                 $help_content = __($help_content);
                 break;
             case 'video-gallery_page_cvg-gallery-add':
                 $help_content = '<p><strong>Cool Video Gallery -  Add Gallery / Upload Videos</strong></p>';
                 $help_content .= '<p>This page provides two tabs to add gallery and upload videos. `Add new gallery` tab provides option to add new video galleries and `Upload videos` tab provides option to upload mulitple videos to a selected gallery.</p>';
                 $help_content = __($help_content);
                 break;
             case 'video-gallery_page_cvg-gallery-manage':
                 $help_content = '<p><strong>Cool Video Gallery - Manage Video Gallery</strong></p>';
                 $help_content .= '<p>Lists the different galleries created and shows a brief about each gallery denoting the no. of videos, author of gallery, description of gallery and option to delete a gallery. Option provided to perform bulk deletion of galleries. Pagination feature added for gallery listing.</p>';
                 $help_content = __($help_content);
                 break;
             case 'video-gallery_page_cvg-gallery-details':
                 $help_content = '<p><strong>Cool Video Gallery - Gallery Details</strong></p>';
                 $help_content .= '<p>Displays the details of a particular gallery. Top section shows the name and description of the gallery which can be updated. Details of all the videos uploaded to a certain gallery is listed below this. Bulk deletion and sorting of videos is provided as other options.</p>';
                 $help_content = __($help_content);
                 break;
             case 'video-gallery_page_cvg-gallery-sort':
                 $help_content = '<p><strong>Cool Video Gallery - Gallery Sorting</strong></p>';
                 $help_content .= '<p>Options to sort videos in a gallery. Sort by Video ID, Video Name or drag-drop to change video order.</p>';
                 $help_content = __($help_content);
                 break;
             case 'video-gallery_page_cvg-gallery-settings':
                 $help_content = '<p><strong>Cool Video Gallery - Video Gallery Settings</strong></p>';
                 $help_content .= '<p>Shows the different options available for listing and managing a gallery.</p>';
                 $help_content = __($help_content);
                 break;
             case 'video-gallery_page_cvg-player-settings':
                 $help_content = '<p><strong>Cool Video Gallery - Video Player Settings</strong></p>';
                 $help_content .= '<p>Options to manage different options of video player is provided here.</p>';
                 $help_content = __($help_content);
                 break;
             case 'video-gallery_page_cvg-video-sitemap':
                 $help_content = '<p><strong>Cool Video Gallery - Generate Google XML Video Sitemap</strong></p>';
                 $help_content .= '<p>Option to generate XML Sitemap for videos.</p>';
                 break;
             case 'video-gallery_page_cvg-plugin-uninstall':
                 $help_content = '<p><strong>Cool Video Gallery - Uninstall plugin</strong></p>';
                 $help_content .= '<p>Option to uninstall plugin.</p>';
                 $help_content = __($help_content);
                 break;
         }
         add_contextual_help($help, $help_content);
     }
 }
Пример #29
0
        $bulklinks = (array) $_REQUEST['linkcheck'];
        foreach ($bulklinks as $link_id) {
            $link_id = (int) $link_id;
            wp_delete_link($link_id);
        }
        wp_redirect(add_query_arg('deleted', count($bulklinks), admin_url('link-manager.php')));
        exit;
    }
} elseif (!empty($_GET['_wp_http_referer'])) {
    wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    exit;
}
$wp_list_table->prepare_items();
$title = __('Links');
$this_file = $parent_file = 'link-manager.php';
add_contextual_help($current_screen, '<p>' . sprintf(__('You can add links here to be displayed on your site, usually using <a href="%s">Widgets</a>. By default, links to several sites in the WordPress community are included as examples.'), 'widgets.php') . '</p>' . '<p>' . __('Links may be separated into categories; these are different than the categories used on your posts.') . '</p>' . '<p>' . __('You can customize the display of this screen using the Screen Options tab and/or the dropdown filters above the links table.') . '</p>' . '<p>' . __('If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.') . '</p>' . '<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.wordpress.org/Links_Screen" target="_blank">Documentation on Managing Links</a>') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>');
include_once './admin-header.php';
if (!current_user_can('manage_links')) {
    wp_die(__("You do not have sufficient permissions to edit the links for this site."));
}
?>

<div class="wrap nosubsub">
<?php 
screen_icon();
?>
<h2><?php 
echo esc_html($title);
?>
 <a href="link-add.php" class="add-new-h2"><?php 
echo esc_html_x('Add New', 'link');
Пример #30
0
 /**
  * WPP Contextual Help
  *
  * @global $current_screen
  *
  * @param $args
  *
  * @author korotkov@ud
  */
 function wpp_contextual_help($args = array())
 {
     global $contextual_help;
     $defaults = array('contextual_help' => array());
     extract(wp_parse_args($args, $defaults));
     //** If method exists add_help_tab in WP_Screen */
     if (is_callable(array('WP_Screen', 'add_help_tab'))) {
         //** Loop through help items and build tabs */
         foreach ((array) $contextual_help as $help_tab_title => $help) {
             //** Add tab with current info */
             get_current_screen()->add_help_tab(array('id' => sanitize_title($help_tab_title), 'title' => __($help_tab_title, ud_get_wp_property()->domain), 'content' => implode("\n", (array) $contextual_help[$help_tab_title])));
         }
         //** Add help sidebar with More Links */
         get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:', ud_get_wp_property()->domain) . '</strong></p>' . '<p>' . __('<a href="https://usabilitydynamics.com/products/wp-property/" target="_blank">WP-Property Product Page</a>', ud_get_wp_property()->domain) . '</p>' . '<p>' . __('<a href="https://usabilitydynamics.com/products/wp-property/forum/" target="_blank">WP-Property Forums</a>', ud_get_wp_property()->domain) . '</p>' . '<p>' . __('<a href="https://usabilitydynamics.com/help/" target="_blank">WP-Property Tutorials</a>', ud_get_wp_property()->domain) . '</p>');
     } else {
         global $current_screen;
         add_contextual_help($current_screen->id, '<p>' . __('Please upgrade Wordpress to the latest version for detailed help.', ud_get_wp_property()->domain) . '</p><p>' . __('Or visit <a href="https://usabilitydynamics.com/tutorials/wp-property-help/" target="_blank">WP-Property Help Page</a> on UsabilityDynamics.com', ud_get_wp_property()->domain) . '</p>');
     }
 }