本文整理汇总了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);
}
示例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);
}
示例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());
}
}