當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WP_Screen::add_old_compat_help方法代碼示例

本文整理匯總了PHP中WP_Screen::add_old_compat_help方法的典型用法代碼示例。如果您正苦於以下問題:PHP WP_Screen::add_old_compat_help方法的具體用法?PHP WP_Screen::add_old_compat_help怎麽用?PHP WP_Screen::add_old_compat_help使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WP_Screen的用法示例。


在下文中一共展示了WP_Screen::add_old_compat_help方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: add_contextual_help

/**
 * Add contextual help text for a page.
 *
 * Creates a 'Screen Info' help tab.
 *
 * @since 2.7.0
 *
 * @param string    $screen The handle for the screen to add help to.  This is usually the hook name returned by the add_*_page() functions.
 * @param string    $help   The content of a 'Screen Info' help tab.
 *
 * @todo: deprecate?
 */
function add_contextual_help($screen, $help)
{
    if (is_string($screen)) {
        $screen = convert_to_screen($screen);
    }
    WP_Screen::add_old_compat_help($screen, $help);
}
開發者ID:redteam,項目名稱:wordpress-,代碼行數:19,代碼來源:screen.php

示例2: add_contextual_help

/**
 * Add contextual help text for a page.
 *
 * Creates an 'Overview' help tab.
 *
 * @since 2.7.0
 * @deprecated 3.3.0
 * @deprecated Use get_current_screen()->add_help_tab()
 * @see WP_Screen
 *
 * @param string    $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
 * @param string    $help   The content of an 'Overview' help tab.
 */
function add_contextual_help($screen, $help)
{
    _deprecated_function(__FUNCTION__, '3.3', 'get_current_screen()->add_help_tab()');
    if (is_string($screen)) {
        $screen = convert_to_screen($screen);
    }
    WP_Screen::add_old_compat_help($screen, $help);
}
開發者ID:valiror,項目名稱:sharingdais_demo1,代碼行數:21,代碼來源:deprecated.php

示例3: load_manage_page

 /**
  * Function is loaded by WordPress, if WP-Table Reloaded's admin menu entry is called,
  * Load the scripts, stylesheets and language, all of this will be done before the page is shown by show_manage_page()
  */
 function load_manage_page()
 {
     // show admin footer message (only on pages of WP-Table Reloaded)
     add_filter('admin_footer_text', array(&$this->helper, 'add_admin_footer_text'));
     $this->init_language_support();
     // get and check action parameter from passed variables
     $default_action = 'list';
     $default_action = apply_filters('wp_table_reloaded_default_action', $default_action);
     $this->allowed_actions = apply_filters('wp_table_reloaded_allowed_actions', $this->allowed_actions);
     $action = !empty($_REQUEST['action']) ? $_REQUEST['action'] : $default_action;
     // check if action is in allowed actions and if method is callable, if yes, call it
     if (in_array($action, $this->allowed_actions)) {
         $this->action = $action;
     }
     add_thickbox();
     // load js and css for admin, needs to stand below thickbox script
     $this->add_manage_page_js();
     // will add script to footer
     $this->add_manage_page_css();
     // needs to be added to the header
     // done after determining the action, because needs action parameter to load correct help string
     if (version_compare($GLOBALS['wp_version'], '3.3', '>')) {
         WP_Screen::add_old_compat_help(convert_to_screen($this->hook), $this->helper->get_contextual_help_string());
     } else {
         add_contextual_help($this->hook, $this->helper->get_contextual_help_string());
     }
 }
開發者ID:vsalx,項目名稱:rattieinfo,代碼行數:31,代碼來源:controller-admin.php


注:本文中的WP_Screen::add_old_compat_help方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。