Docs: Improve documentation for `WP_Screen::add_help_tab()`.
Props atachibana. Fixes #48395. Built from https://develop.svn.wordpress.org/trunk@46590 git-svn-id: http://core.svn.wordpress.org/trunk@46387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
49007e52bc
commit
67c73ea3ea
|
@ -594,7 +594,13 @@ final class WP_Screen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a help tab to the contextual help for the screen.
|
* Add a help tab to the contextual help for the screen.
|
||||||
* Call this on the load-$pagenow hook for the relevant screen.
|
*
|
||||||
|
* Call this on the `load-$pagenow` hook for the relevant screen,
|
||||||
|
* or fetch the `$current_screen` object, or use get_current_screen()
|
||||||
|
* and then call the method from the object.
|
||||||
|
*
|
||||||
|
* You may need to filter `$current_screen` using an if or switch statement
|
||||||
|
* to prevent new help tabs from being added to ALL admin screens.
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
* @since 4.4.0 The `$priority` argument was added.
|
* @since 4.4.0 The `$priority` argument was added.
|
||||||
|
@ -603,7 +609,8 @@ final class WP_Screen {
|
||||||
* Array of arguments used to display the help tab.
|
* Array of arguments used to display the help tab.
|
||||||
*
|
*
|
||||||
* @type string $title Title for the tab. Default false.
|
* @type string $title Title for the tab. Default false.
|
||||||
* @type string $id Tab ID. Must be HTML-safe. Default false.
|
* @type string $id Tab ID. Must be HTML-safe and should be unique for this menu.
|
||||||
|
* It is NOT allowed to contain any empty spaces. Default false.
|
||||||
* @type string $content Optional. Help tab content in plain text or HTML. Default empty string.
|
* @type string $content Optional. Help tab content in plain text or HTML. Default empty string.
|
||||||
* @type string $callback Optional. A callback to generate the tab content. Default false.
|
* @type string $callback Optional. A callback to generate the tab content. Default false.
|
||||||
* @type int $priority Optional. The priority of the tab, used for ordering. Default 10.
|
* @type int $priority Optional. The priority of the tab, used for ordering. Default 10.
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.4-alpha-46589';
|
$wp_version = '5.4-alpha-46590';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue