WordPress函数文档add_contextual_help()

添加帮助信息 用法  <?php add_contextual_help( $screen, $help…

添加帮助信息

用法

 <?php add_contextual_help$screen$help ); ?> 

参数

$screen

(string) (必填) The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.

默认值: None

$help

(string) (必填) An arbitrary string containing HTML for help text.

默认值: None

注意

When using this function to add contextual help to an admin page created by a plugin or theme, it is important to remember that the add_*_page() set of functions build and return custom hook names – which are needed in order to use add_contextual_help().

This page hook name is usually made up of two page slugs separated by an underscore – the slug for the current page (as defined in your add_*_page() function), an underscore, and the slug for the parent page.

For example, if you created a new “theme_options” subpage under the Admin > Appearance menu (which itself has a slug of “appearance_page”), your page hook would be “appearance_page_theme_options”.

To modify or add to the hard-coded help text for default WordPress admin pages, you have to use the gettext 过滤器 hook.

历史

  • 添加于 版本: 2.7.0
  • Deprecated: 3.3.0
  • Replace by: add_help_tab()

源文件

add_contextual_help() 函数的代码位于 wp-admin/includes/template.php.

  • 原文:http://codex.wordpress.org/Function_Reference/add_contextual_help
类别:WordPress函数文档

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT