Skip to content

Commit dc6c8c8

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@58419 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c756dfe commit dc6c8c8

15 files changed

Lines changed: 31 additions & 30 deletions

src/wp-admin/admin-header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* In case admin-header.php is included in a function.
1616
*
17-
* @global string $title
17+
* @global string $title The title of the current screen.
1818
* @global string $hook_suffix
1919
* @global WP_Screen $current_screen WordPress current screen object.
2020
* @global WP_Locale $wp_locale WordPress date and time locale object.

src/wp-admin/edit-form-advanced.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
}
1313

1414
/**
15-
* @global string $post_type
16-
* @global WP_Post_Type $post_type_object
15+
* @global string $post_type Global post type.
16+
* @global WP_Post_Type $post_type_object Global post type object.
1717
* @global WP_Post $post Global post object.
1818
*/
1919
global $post_type, $post_type_object, $post;

src/wp-admin/edit-form-blocks.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
}
1515

1616
/**
17-
* @global string $post_type
18-
* @global WP_Post_Type $post_type_object
17+
* @global string $post_type Global post type.
18+
* @global WP_Post_Type $post_type_object Global post type object.
1919
* @global WP_Post $post Global post object.
20-
* @global string $title
21-
* @global array $wp_meta_boxes
20+
* @global string $title The title of the current screen.
21+
* @global array $wp_meta_boxes Global meta box state.
2222
*/
2323
global $post_type, $post_type_object, $post, $title, $wp_meta_boxes;
2424

src/wp-admin/edit-tags.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
}
3333

3434
/**
35-
* $post_type is set when the WP_Terms_List_Table instance is created
35+
* $post_type is set when the WP_Terms_List_Table instance is created.
3636
*
37-
* @global string $post_type
37+
* @global string $post_type Global post type.
3838
*/
3939
global $post_type;
4040

src/wp-admin/edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
}
3030

3131
/**
32-
* @global string $post_type
33-
* @global WP_Post_Type $post_type_object
32+
* @global string $post_type Global post type.
33+
* @global WP_Post_Type $post_type_object Global post type object.
3434
*/
3535
global $post_type, $post_type_object;
3636

src/wp-admin/includes/class-wp-posts-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class WP_Posts_List_Table extends WP_List_Table {
6565
*
6666
* @see WP_List_Table::__construct() for more information on default arguments.
6767
*
68-
* @global WP_Post_Type $post_type_object
68+
* @global WP_Post_Type $post_type_object Global post type object.
6969
* @global wpdb $wpdb WordPress database abstraction object.
7070
*
7171
* @param array $args An associative array of arguments.

src/wp-admin/includes/class-wp-screen.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ public function render_screen_meta() {
984984
}
985985

986986
/**
987-
* @global array $wp_meta_boxes
987+
* @global array $wp_meta_boxes Global meta box state.
988988
*
989989
* @return bool
990990
*/
@@ -1103,7 +1103,7 @@ public function render_screen_options( $options = array() ) {
11031103
*
11041104
* @since 4.4.0
11051105
*
1106-
* @global array $wp_meta_boxes
1106+
* @global array $wp_meta_boxes Global meta box state.
11071107
*/
11081108
public function render_meta_boxes_preferences() {
11091109
global $wp_meta_boxes;

src/wp-admin/includes/class-wp-terms-list-table.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class WP_Terms_List_Table extends WP_List_Table {
2727
*
2828
* @see WP_List_Table::__construct() for more information on default arguments.
2929
*
30-
* @global string $post_type
31-
* @global string $taxonomy
30+
* @global string $post_type Global post type.
31+
* @global string $taxonomy Global taxonomy.
3232
* @global string $action
3333
* @global object $tax
3434
*
@@ -330,7 +330,8 @@ private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$coun
330330
}
331331

332332
/**
333-
* @global string $taxonomy
333+
* @global string $taxonomy Global taxonomy.
334+
*
334335
* @param WP_Term $tag Term object.
335336
* @param int $level
336337
*/

src/wp-admin/includes/nav-menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function wp_nav_menu_setup() {
204204
*
205205
* @since 3.0.0
206206
*
207-
* @global array $wp_meta_boxes
207+
* @global array $wp_meta_boxes Global meta box state.
208208
*/
209209
function wp_initial_nav_menu_meta_boxes() {
210210
global $wp_meta_boxes;

src/wp-admin/includes/plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2030,7 +2030,7 @@ function get_admin_page_parent( $parent_page = '' ) {
20302030
*
20312031
* @since 1.5.0
20322032
*
2033-
* @global string $title
2033+
* @global string $title The title of the current screen.
20342034
* @global array $menu
20352035
* @global array $submenu
20362036
* @global string $pagenow The filename of the current screen.

0 commit comments

Comments
 (0)