Docs: Add missing description for a few globals in the admin.

This affects:

* `$post_type`
* `$post_type_object`
* `$taxonomy`
* `$title`
* `$wp_meta_boxes`

Follow-up to [31121], [32642], [32643], [37890], [43815], [44244], [45742], [53060], [53061], [54831].

Props shub07, 1naveengiri, sabernhardt, SergeyBiryukov.
Fixes #59561.
Built from https://develop.svn.wordpress.org/trunk@58419


git-svn-id: http://core.svn.wordpress.org/trunk@57868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-06-15 12:34:13 +00:00
parent 9ccb882ff0
commit 616c656c96
16 changed files with 32 additions and 31 deletions

View File

@ -14,7 +14,7 @@ if ( ! defined( 'WP_ADMIN' ) ) {
/**
* In case admin-header.php is included in a function.
*
* @global string $title
* @global string $title The title of the current screen.
* @global string $hook_suffix
* @global WP_Screen $current_screen WordPress current screen object.
* @global WP_Locale $wp_locale WordPress date and time locale object.

View File

@ -12,8 +12,8 @@ if ( ! defined( 'ABSPATH' ) ) {
}
/**
* @global string $post_type
* @global WP_Post_Type $post_type_object
* @global string $post_type Global post type.
* @global WP_Post_Type $post_type_object Global post type object.
* @global WP_Post $post Global post object.
*/
global $post_type, $post_type_object, $post;

View File

@ -14,11 +14,11 @@ if ( ! defined( 'ABSPATH' ) ) {
}
/**
* @global string $post_type
* @global WP_Post_Type $post_type_object
* @global string $post_type Global post type.
* @global WP_Post_Type $post_type_object Global post type object.
* @global WP_Post $post Global post object.
* @global string $title
* @global array $wp_meta_boxes
* @global string $title The title of the current screen.
* @global array $wp_meta_boxes Global meta box state.
*/
global $post_type, $post_type_object, $post, $title, $wp_meta_boxes;

View File

@ -32,9 +32,9 @@ if ( ! current_user_can( $tax->cap->manage_terms ) ) {
}
/**
* $post_type is set when the WP_Terms_List_Table instance is created
* $post_type is set when the WP_Terms_List_Table instance is created.
*
* @global string $post_type
* @global string $post_type Global post type.
*/
global $post_type;

View File

@ -29,8 +29,8 @@ if ( 'attachment' === $typenow ) {
}
/**
* @global string $post_type
* @global WP_Post_Type $post_type_object
* @global string $post_type Global post type.
* @global WP_Post_Type $post_type_object Global post type object.
*/
global $post_type, $post_type_object;

View File

@ -65,7 +65,7 @@ class WP_Posts_List_Table extends WP_List_Table {
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
* @global WP_Post_Type $post_type_object
* @global WP_Post_Type $post_type_object Global post type object.
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $args An associative array of arguments.

View File

@ -984,7 +984,7 @@ final class WP_Screen {
}
/**
* @global array $wp_meta_boxes
* @global array $wp_meta_boxes Global meta box state.
*
* @return bool
*/
@ -1103,7 +1103,7 @@ final class WP_Screen {
*
* @since 4.4.0
*
* @global array $wp_meta_boxes
* @global array $wp_meta_boxes Global meta box state.
*/
public function render_meta_boxes_preferences() {
global $wp_meta_boxes;

View File

@ -27,8 +27,8 @@ class WP_Terms_List_Table extends WP_List_Table {
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
* @global string $post_type
* @global string $taxonomy
* @global string $post_type Global post type.
* @global string $taxonomy Global taxonomy.
* @global string $action
* @global object $tax
*
@ -330,7 +330,8 @@ class WP_Terms_List_Table extends WP_List_Table {
}
/**
* @global string $taxonomy
* @global string $taxonomy Global taxonomy.
*
* @param WP_Term $tag Term object.
* @param int $level
*/

View File

@ -204,7 +204,7 @@ function wp_nav_menu_setup() {
*
* @since 3.0.0
*
* @global array $wp_meta_boxes
* @global array $wp_meta_boxes Global meta box state.
*/
function wp_initial_nav_menu_meta_boxes() {
global $wp_meta_boxes;

View File

@ -2030,7 +2030,7 @@ function get_admin_page_parent( $parent_page = '' ) {
*
* @since 1.5.0
*
* @global string $title
* @global string $title The title of the current screen.
* @global array $menu
* @global array $submenu
* @global string $pagenow The filename of the current screen.

View File

@ -2345,7 +2345,7 @@ function get_block_editor_server_block_settings() {
*
* @global WP_Post $post Global post object.
* @global WP_Screen $current_screen WordPress current screen object.
* @global array $wp_meta_boxes
* @global array $wp_meta_boxes Global meta box state.
*/
function the_block_editor_meta_boxes() {
global $post, $current_screen, $wp_meta_boxes;

View File

@ -89,7 +89,7 @@ function get_hidden_columns( $screen ) {
*
* @since 2.7.0
*
* @global array $wp_meta_boxes
* @global array $wp_meta_boxes Global meta box state.
*
* @param WP_Screen $screen
*/

View File

@ -1050,7 +1050,7 @@ function wp_import_upload_form( $action ) {
* @since 2.5.0
* @since 4.4.0 The `$screen` parameter now accepts an array of screen IDs.
*
* @global array $wp_meta_boxes
* @global array $wp_meta_boxes Global meta box state.
*
* @param string $id Meta box ID (used in the 'id' attribute for the meta box).
* @param string $title Title of the meta box.
@ -1287,7 +1287,7 @@ function _get_plugin_from_callback( $callback ) {
*
* @since 2.5.0
*
* @global array $wp_meta_boxes
* @global array $wp_meta_boxes Global meta box state.
*
* @param string|WP_Screen $screen The screen identifier. If you have used add_menu_page() or
* add_submenu_page() to create a new screen (and hence screen_id)
@ -1472,7 +1472,7 @@ function do_meta_boxes( $screen, $context, $data_object ) {
* @since 2.6.0
* @since 4.4.0 The `$screen` parameter now accepts an array of screen IDs.
*
* @global array $wp_meta_boxes
* @global array $wp_meta_boxes Global meta box state.
*
* @param string $id Meta box ID (used in the 'id' attribute for the meta box).
* @param string|array|WP_Screen $screen The screen or screens on which the meta box is shown (such as a

View File

@ -10,9 +10,9 @@
require_once __DIR__ . '/admin.php';
/**
* @global string $post_type
* @global object $post_type_object
* @global WP_Post $post Global post object.
* @global string $post_type Global post type.
* @global WP_Post_Type $post_type_object Global post type object.
* @global WP_Post $post Global post object.
*/
global $post_type, $post_type_object, $post;

View File

@ -28,9 +28,9 @@ if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post']
$post_ID = $post_id;
/**
* @global string $post_type
* @global object $post_type_object
* @global WP_Post $post Global post object.
* @global string $post_type Global post type.
* @global WP_Post_Type $post_type_object Global post type object.
* @global WP_Post $post Global post object.
*/
global $post_type, $post_type_object, $post;

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-beta2-58418';
$wp_version = '6.6-beta2-58419';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.