diff --git a/wp-admin/admin-footer.php b/wp-admin/admin-footer.php
index ce8b415392..a99eabac13 100644
--- a/wp-admin/admin-footer.php
+++ b/wp-admin/admin-footer.php
@@ -81,6 +81,7 @@ do_action( 'admin_print_footer_scripts' );
*
* @since 2.8.0
*
+ * @global string $hook_suffix
* @param string $hook_suffix The current admin page.
*/
do_action( "admin_footer-" . $GLOBALS['hook_suffix'] );
diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php
index 8b6b6a021f..dd354de36c 100644
--- a/wp-admin/admin-header.php
+++ b/wp-admin/admin-header.php
@@ -10,7 +10,19 @@
if ( ! defined( 'WP_ADMIN' ) )
require_once( dirname( __FILE__ ) . '/admin.php' );
-// In case admin-header.php is included in a function.
+/**
+ * In case admin-header.php is included in a function.
+ *
+ * @global string $title
+ * @global string $hook_suffix
+ * @global WP_Screen $current_screen
+ * @global WP_Locale $wp_locale
+ * @global string $pagenow
+ * @global string $wp_version
+ * @global string $update_title
+ * @global int $total_update_count
+ * @global string $parent_file
+ */
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
$update_title, $total_update_count, $parent_file;
diff --git a/wp-admin/admin.php b/wp-admin/admin.php
index 22813cc74f..d3e58d2549 100644
--- a/wp-admin/admin.php
+++ b/wp-admin/admin.php
@@ -94,11 +94,21 @@ $time_format = get_option('time_format');
wp_enqueue_script( 'common' );
-// $pagenow is set in vars.php
-// $wp_importers is sometimes set in wp-admin/includes/import.php
-//
-// The remaining variables are imported as globals elsewhere,
-// declared as globals here
+
+
+
+/**
+ * $pagenow is set in vars.php
+ * $wp_importers is sometimes set in wp-admin/includes/import.php
+ * The remaining variables are imported as globals elsewhere, declared as globals here
+ *
+ * @global string $pagenow
+ * @global array $wp_importers
+ * @global string $hook_suffix
+ * @global string $plugin_page
+ * @global string $typenow
+ * @global string $taxnow
+ */
global $pagenow, $wp_importers, $hook_suffix, $plugin_page, $typenow, $taxnow;
$page_hook = null;
diff --git a/wp-admin/comment.php b/wp-admin/comment.php
index c2487335b8..0630c07474 100644
--- a/wp-admin/comment.php
+++ b/wp-admin/comment.php
@@ -12,6 +12,9 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
$parent_file = 'edit-comments.php';
$submenu_file = 'edit-comments.php';
+/**
+ * @global string $action
+ */
global $action;
wp_reset_vars( array('action') );
diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php
index 55ffe03e21..712e4cc83d 100644
--- a/wp-admin/custom-header.php
+++ b/wp-admin/custom-header.php
@@ -228,6 +228,8 @@ class Custom_Image_Header {
* Process the default headers
*
* @since 3.0.0
+ *
+ * @global array $_wp_default_headers
*/
public function process_default_headers() {
global $_wp_default_headers;
diff --git a/wp-admin/customize.php b/wp-admin/customize.php
index fc181db06c..65caa29d90 100644
--- a/wp-admin/customize.php
+++ b/wp-admin/customize.php
@@ -33,6 +33,10 @@ if ( ! $return ) {
}
}
+/**
+ * @global WP_Scripts $wp_scripts
+ * @global WP_Customize_Manager $wp_customize
+ */
global $wp_scripts, $wp_customize;
$registered = $wp_scripts->registered;
diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
index 451691af4c..5b5abb0ccf 100644
--- a/wp-admin/edit-form-advanced.php
+++ b/wp-admin/edit-form-advanced.php
@@ -10,6 +10,11 @@
if ( !defined('ABSPATH') )
die('-1');
+/**
+ * @global string $post_type
+ * @global object $post_type_object
+ * @global WP_Post $post
+ */
global $post_type, $post_type_object, $post;
wp_enqueue_script('post');
diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php
index 7afbec8bcd..5720b7a7ef 100644
--- a/wp-admin/edit-tags.php
+++ b/wp-admin/edit-tags.php
@@ -20,7 +20,11 @@ if ( ! $tax )
if ( ! current_user_can( $tax->cap->manage_terms ) )
wp_die( __( 'Cheatin’ uh?' ), 403 );
-// $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 $post_type;
$wp_list_table = _get_list_table('WP_Terms_List_Table');
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index ad8c078681..cc3c8dc32c 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -18,6 +18,10 @@ if ( 'attachment' === $typenow ) {
}
}
+/**
+ * @global string $post_type
+ * @global object $post_type_object
+ */
global $post_type, $post_type_object;
$post_type = $typenow;
diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
index a705e43e65..04479c95c2 100644
--- a/wp-admin/includes/ajax-actions.php
+++ b/wp-admin/includes/ajax-actions.php
@@ -78,6 +78,8 @@ function wp_ajax_nopriv_heartbeat() {
* Ajax handler for fetching a list table.
*
* @since 3.1.0
+ *
+ * @global WP_List_Table $wp_list_table
*/
function wp_ajax_fetch_list() {
global $wp_list_table;
@@ -226,6 +228,8 @@ function wp_ajax_imgedit_preview() {
* Ajax handler for oEmbed caching.
*
* @since 3.1.0
+ *
+ * @global WP_Embed $wp_embed
*/
function wp_ajax_oembed_cache() {
$GLOBALS['wp_embed']->cache_oembed( $_GET['post'] );
@@ -762,6 +766,8 @@ function wp_ajax_add_link_category( $action ) {
* Ajax handler to add a tag.
*
* @since 3.1.0
+ *
+ * @global WP_List_Table $wp_list_table
*/
function wp_ajax_add_tag() {
global $wp_list_table;
@@ -864,6 +870,9 @@ function wp_ajax_get_tagcloud() {
*
* @since 3.1.0
*
+ * @global WP_List_Table $wp_list_table
+ * @global int $post_id
+ *
* @param string $action Action to perform.
*/
function wp_ajax_get_comments( $action ) {
@@ -915,6 +924,8 @@ function wp_ajax_get_comments( $action ) {
*
* @since 3.1.0
*
+ * @global WP_List_Table $wp_list_table
+ *
* @param string $action Action to perform.
*/
function wp_ajax_replyto_comment( $action ) {
@@ -1016,6 +1027,8 @@ function wp_ajax_replyto_comment( $action ) {
* Ajax handler for editing a comment.
*
* @since 3.1.0
+ *
+ * @global WP_List_Table $wp_list_table
*/
function wp_ajax_edit_comment() {
global $wp_list_table;
@@ -1229,6 +1242,8 @@ function wp_ajax_add_meta() {
*
* @since 3.1.0
*
+ * @global WP_List_Table $wp_list_table
+ *
* @param string $action Action to perform.
*/
function wp_ajax_add_user( $action ) {
@@ -1499,6 +1514,8 @@ function wp_ajax_sample_permalink() {
* Ajax handler for Quick Edit saving a post from a list table.
*
* @since 3.1.0
+ *
+ * @global WP_List_Table $wp_list_table
*/
function wp_ajax_inline_save() {
global $wp_list_table;
@@ -1591,6 +1608,8 @@ function wp_ajax_inline_save() {
* Ajax handler for quick edit saving for a term.
*
* @since 3.1.0
+ *
+ * @global WP_List_Table $wp_list_table
*/
function wp_ajax_inline_save_tax() {
global $wp_list_table;
@@ -1743,6 +1762,10 @@ function wp_ajax_widgets_order() {
* Ajax handler for saving a widget.
*
* @since 3.1.0
+ *
+ * @global array $wp_registered_widgets
+ * @global array $wp_registered_widget_controls
+ * @global array $wp_registered_widget_updates
*/
function wp_ajax_save_widget() {
global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates;
@@ -1832,6 +1855,8 @@ function wp_ajax_save_widget() {
* Ajax handler for saving a widget.
*
* @since 3.9.0
+ *
+ * @global WP_Customize_Manager $wp_customize
*/
function wp_ajax_update_widget() {
global $wp_customize;
@@ -2475,6 +2500,9 @@ function wp_ajax_send_attachment_to_editor() {
* - video_send_to_editor_url
*
* @since 3.5.0
+ *
+ * @global WP_Post $post
+ * @global WP_Embed $wp_embed
*/
function wp_ajax_send_link_to_editor() {
global $post, $wp_embed;
@@ -2627,6 +2655,8 @@ function wp_ajax_get_revision_diffs() {
* a user's own profile.
*
* @since 3.8.0
+ *
+ * @global array $_wp_admin_css_colors
*/
function wp_ajax_save_user_color_scheme() {
global $_wp_admin_css_colors;
@@ -2652,6 +2682,9 @@ function wp_ajax_save_user_color_scheme() {
* Ajax handler for getting themes from themes_api().
*
* @since 3.9.0
+ *
+ * @global array $themes_allowedtags
+ * @global array $theme_field_defaults
*/
function wp_ajax_query_themes() {
global $themes_allowedtags, $theme_field_defaults;
@@ -2699,8 +2732,9 @@ function wp_ajax_query_themes() {
*
* @since 4.0.0
*
- * @global WP_Post $post Global $post.
- * @global WP_Embed $wp_embed Embed API instance.
+ * @global WP_Post $post Global $post.
+ * @global WP_Embed $wp_embed Embed API instance.
+ * @global WP_Scripts $wp_scripts
*/
function wp_ajax_parse_embed() {
global $post, $wp_embed;
@@ -2788,6 +2822,11 @@ function wp_ajax_parse_embed() {
) );
}
+/**
+ *
+ * @global WP_Post $post
+ * @global WP_Scripts $wp_scripts
+ */
function wp_ajax_parse_media_shortcode() {
global $post, $wp_scripts;
@@ -2967,6 +3006,8 @@ function wp_ajax_update_plugin() {
* AJAX handler for saving a post from Press This.
*
* @since 4.2.0
+ *
+ * @global WP_Press_This $wp_press_this
*/
function wp_ajax_press_this_save_post() {
if ( empty( $GLOBALS['wp_press_this'] ) ) {
@@ -2980,6 +3021,8 @@ function wp_ajax_press_this_save_post() {
* AJAX handler for creating new category from Press This.
*
* @since 4.2.0
+ *
+ * @global WP_Press_This $wp_press_this
*/
function wp_ajax_press_this_add_category() {
if ( empty( $GLOBALS['wp_press_this'] ) ) {
diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php
index b73df8b8aa..5b97f53e6c 100644
--- a/wp-admin/includes/bookmark.php
+++ b/wp-admin/includes/bookmark.php
@@ -74,6 +74,8 @@ function get_default_link_to_edit() {
*
* @since 2.0.0
*
+ * @global wpdb $wpdb
+ *
* @param int $link_id ID of the link to delete
* @return bool True
*/
@@ -137,6 +139,8 @@ function get_link_to_edit( $link_id ) {
*
* @since 2.0.0
*
+ * @global wpdb $wpdb
+ *
* @param array $linkdata Elements that make up the link to insert.
* @param bool $wp_error Optional. If true return WP_Error object on failure.
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
@@ -285,6 +289,8 @@ function wp_update_link( $linkdata ) {
/**
* @since 3.5.0
* @access private
+ *
+ * @global string $pagenow
*/
function wp_link_manager_disabled_message() {
global $pagenow;
diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php
index c617bfa021..0c7b5129c4 100644
--- a/wp-admin/includes/class-wp-comments-list-table.php
+++ b/wp-admin/includes/class-wp-comments-list-table.php
@@ -33,6 +33,8 @@ class WP_Comments_List_Table extends WP_List_Table {
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
+ * @global int $post_id
+ *
* @param array $args An associative array of arguments.
*/
public function __construct( $args = array() ) {
@@ -55,6 +57,13 @@ class WP_Comments_List_Table extends WP_List_Table {
return current_user_can('edit_posts');
}
+ /**
+ *
+ * @global int $post_id
+ * @global string $comment_status
+ * @global string $search
+ * @global string $comment_type
+ */
public function prepare_items() {
global $post_id, $comment_status, $search, $comment_type;
@@ -153,6 +162,10 @@ class WP_Comments_List_Table extends WP_List_Table {
return $comments_per_page;
}
+ /**
+ *
+ * @global string $comment_status
+ */
public function no_items() {
global $comment_status;
@@ -162,6 +175,12 @@ class WP_Comments_List_Table extends WP_List_Table {
_e( 'No comments found.' );
}
+ /**
+ *
+ * @global int $post_id
+ * @global string $comment_status
+ * @global string $comment_type
+ */
protected function get_views() {
global $post_id, $comment_status, $comment_type;
@@ -215,6 +234,10 @@ class WP_Comments_List_Table extends WP_List_Table {
return $status_links;
}
+ /**
+ *
+ * @global string $comment_status
+ */
protected function get_bulk_actions() {
global $comment_status;
@@ -239,6 +262,12 @@ class WP_Comments_List_Table extends WP_List_Table {
return $actions;
}
+ /**
+ *
+ * @global string $comment_status
+ * @global string $comment_type
+ * @param string $which
+ */
protected function extra_tablenav( $which ) {
global $comment_status, $comment_type;
?>
@@ -299,6 +328,11 @@ class WP_Comments_List_Table extends WP_List_Table {
return parent::current_action();
}
+ /**
+ *
+ * @global int $post_id
+ * @return array
+ */
public function get_columns() {
global $post_id;
@@ -356,6 +390,12 @@ class WP_Comments_List_Table extends WP_List_Table {
$this->display_tablenav( 'bottom' );
}
+ /**
+ *
+ * @global WP_Post $post
+ * @global object $comment
+ * @param object $a_comment
+ */
public function single_row( $a_comment ) {
global $post, $comment;
@@ -383,6 +423,11 @@ class WP_Comments_List_Table extends WP_List_Table {
}
}
+ /**
+ *
+ * @global string $comment_status
+ * @param object $comment
+ */
public function column_comment( $comment ) {
global $comment_status;
$post = get_post();
@@ -512,6 +557,11 @@ class WP_Comments_List_Table extends WP_List_Table {
}
}
+ /**
+ *
+ * @global string $comment_status
+ * @param object $comment
+ */
public function column_author( $comment ) {
global $comment_status;
diff --git a/wp-admin/includes/class-wp-importer.php b/wp-admin/includes/class-wp-importer.php
index ee10547deb..527eff0c5c 100644
--- a/wp-admin/includes/class-wp-importer.php
+++ b/wp-admin/includes/class-wp-importer.php
@@ -12,6 +12,8 @@ class WP_Importer {
/**
* Returns array with imported permalinks from WordPress database
*
+ * @global wpdb $wpdb
+ *
* @param string $bid
* @return array
*/
@@ -49,6 +51,8 @@ class WP_Importer {
/**
* Return count of imported permalinks from WordPress database
*
+ * @global wpdb $wpdb
+ *
* @param string $bid
* @return int
*/
@@ -75,6 +79,8 @@ class WP_Importer {
/**
* Set array with imported comments from WordPress database
*
+ * @global wpdb $wpdb
+ *
* @param string $bid
* @return array
*/
@@ -231,7 +237,8 @@ class WP_Importer {
/**
* Reset global variables that grow out of control during imports
*
- * @return void
+ * @global wpdb $wpdb
+ * @global array $wp_actions
*/
public function stop_the_insanity() {
global $wpdb, $wp_actions;
diff --git a/wp-admin/includes/class-wp-links-list-table.php b/wp-admin/includes/class-wp-links-list-table.php
index 88d2cc7cb1..a22844503a 100644
--- a/wp-admin/includes/class-wp-links-list-table.php
+++ b/wp-admin/includes/class-wp-links-list-table.php
@@ -30,6 +30,13 @@ class WP_Links_List_Table extends WP_List_Table {
return current_user_can( 'manage_links' );
}
+ /**
+ *
+ * @global int $cat_id
+ * @global string $s
+ * @global string $orderby
+ * @global string $order
+ */
public function prepare_items() {
global $cat_id, $s, $orderby, $order;
@@ -60,6 +67,11 @@ class WP_Links_List_Table extends WP_List_Table {
return $actions;
}
+ /**
+ *
+ * @global int $cat_id
+ * @param string $which
+ */
protected function extra_tablenav( $which ) {
global $cat_id;
@@ -108,6 +120,10 @@ class WP_Links_List_Table extends WP_List_Table {
);
}
+ /**
+ *
+ * @global int $cat_id
+ */
public function display_rows() {
global $cat_id;
diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php
index 5ba6226ad9..16c157cb5b 100644
--- a/wp-admin/includes/class-wp-list-table.php
+++ b/wp-admin/includes/class-wp-list-table.php
@@ -504,6 +504,9 @@ class WP_List_Table {
* @since 3.1.0
* @access protected
*
+ * @global wpdb $wpdb
+ * @global WP_Locale $wp_locale
+ *
* @param string $post_type
*/
protected function months_dropdown( $post_type ) {
diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php
index 7c53ffc0d8..9bcb375f59 100644
--- a/wp-admin/includes/class-wp-media-list-table.php
+++ b/wp-admin/includes/class-wp-media-list-table.php
@@ -41,6 +41,13 @@ class WP_Media_List_Table extends WP_List_Table {
return current_user_can('upload_files');
}
+ /**
+ *
+ * @global WP_Query $wp_query
+ * @global array $post_mime_types
+ * @global array $avail_post_mime_types
+ * @global string $mode
+ */
public function prepare_items() {
global $wp_query, $post_mime_types, $avail_post_mime_types, $mode;
@@ -57,6 +64,13 @@ class WP_Media_List_Table extends WP_List_Table {
) );
}
+ /**
+ *
+ * @global wpdb $wpdb
+ * @global array $post_mime_types
+ * @global array $avail_post_mime_types
+ * @return array
+ */
protected function get_views() {
global $wpdb, $post_mime_types, $avail_post_mime_types;
@@ -160,6 +174,8 @@ class WP_Media_List_Table extends WP_List_Table {
/**
* Override parent views so we can use the filter bar display.
+ *
+ * @global string $mode
*/
public function views() {
global $mode;
@@ -270,6 +286,10 @@ class WP_Media_List_Table extends WP_List_Table {
);
}
+ /**
+ *
+ * @global WP_Post $post
+ */
public function display_rows() {
global $post;
diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php
index 0708791b35..874fa66ce5 100644
--- a/wp-admin/includes/class-wp-ms-sites-list-table.php
+++ b/wp-admin/includes/class-wp-ms-sites-list-table.php
@@ -30,6 +30,12 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
return current_user_can( 'manage_sites' );
}
+ /**
+ *
+ * @global string $s
+ * @global string $mode
+ * @global wpdb $wpdb
+ */
public function prepare_items() {
global $s, $mode, $wpdb;
@@ -147,6 +153,8 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
}
/**
+ * @global string $mode
+ *
* @param string $which
*/
protected function pagination( $which ) {
@@ -192,6 +200,10 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
);
}
+ /**
+ *
+ * @global string $mode
+ */
public function display_rows() {
global $mode;
diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php
index d3b484fe03..9e94e8493e 100644
--- a/wp-admin/includes/class-wp-ms-themes-list-table.php
+++ b/wp-admin/includes/class-wp-ms-themes-list-table.php
@@ -22,6 +22,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
+ * @global string $status
+ * @global int $page
+ *
* @param array $args An associative array of arguments.
*/
public function __construct( $args = array() ) {
@@ -56,6 +59,15 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
return current_user_can( 'manage_network_themes' );
}
+ /**
+ *
+ * @global string $status
+ * @global array $totals
+ * @global int $page
+ * @global string $orderby
+ * @global string $order
+ * @global string $s
+ */
public function prepare_items() {
global $status, $totals, $page, $orderby, $order, $s;
@@ -199,9 +211,11 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
_e( 'You do not appear to have any themes available at this time.' );
}
+ /**
+ *
+ * @return array
+ */
public function get_columns() {
- global $status;
-
return array(
'cb' => '',
'name' => __( 'Theme' ),
@@ -215,6 +229,12 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
);
}
+ /**
+ *
+ * @global array $totals
+ * @global string $status
+ * @return array
+ */
protected function get_views() {
global $totals, $status;
@@ -258,6 +278,11 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
return $status_links;
}
+ /**
+ *
+ * @global string $status
+ * @return array
+ */
protected function get_bulk_actions() {
global $status;
diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php
index 9ab485bf9e..55ca80a703 100644
--- a/wp-admin/includes/class-wp-ms-users-list-table.php
+++ b/wp-admin/includes/class-wp-ms-users-list-table.php
@@ -13,6 +13,13 @@ class WP_MS_Users_List_Table extends WP_List_Table {
return current_user_can( 'manage_network_users' );
}
+ /**
+ *
+ * @global string $usersearch
+ * @global string $role
+ * @global wpdb $wpdb
+ * @global string $mode
+ */
public function prepare_items() {
global $usersearch, $role, $wpdb, $mode;
@@ -86,6 +93,11 @@ class WP_MS_Users_List_Table extends WP_List_Table {
_e( 'No users found.' );
}
+ /**
+ *
+ * @global string $role
+ * @return array
+ */
protected function get_views() {
global $role;
@@ -146,6 +158,10 @@ class WP_MS_Users_List_Table extends WP_List_Table {
);
}
+ /**
+ *
+ * @global string $mode
+ */
public function display_rows() {
global $mode;
diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php
index e1a730610b..ddadfbc2f1 100644
--- a/wp-admin/includes/class-wp-plugin-install-list-table.php
+++ b/wp-admin/includes/class-wp-plugin-install-list-table.php
@@ -48,6 +48,15 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
return $slugs;
}
+ /**
+ *
+ * @global array $tabs
+ * @global string $tab
+ * @global int $paged
+ * @global string $type
+ * @global string $term
+ * @global string $wp_version
+ */
public function prepare_items() {
include( ABSPATH . 'wp-admin/includes/plugin-install.php' );
@@ -208,6 +217,12 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
echo '
' . $message . '
';
}
+ /**
+ *
+ * @global array $tabs
+ * @global string $tab
+ * @return array
+ */
protected function get_views() {
global $tabs, $tab;
@@ -276,6 +291,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
}
/**
+ * @global string $tab
+ *
* @param string $which
*/
protected function display_tablenav( $which ) {
@@ -341,6 +358,9 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
}
}
+ /**
+ * @global string $wp_version
+ */
public function display_rows() {
$plugins_allowedtags = array(
'a' => array( 'href' => array(),'title' => array(), 'target' => array() ),
diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php
index 8ee85ba036..387f80b49d 100644
--- a/wp-admin/includes/class-wp-plugins-list-table.php
+++ b/wp-admin/includes/class-wp-plugins-list-table.php
@@ -17,6 +17,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
+ * @global string $status
+ * @global int $page
+ *
* @param array $args An associative array of arguments.
*/
public function __construct( $args = array() ) {
@@ -45,6 +48,16 @@ class WP_Plugins_List_Table extends WP_List_Table {
return current_user_can('activate_plugins');
}
+ /**
+ *
+ * @global string $status
+ * @global type $plugins
+ * @global array $totals
+ * @global int $page
+ * @global string $orderby
+ * @global string $order
+ * @global string $s
+ */
public function prepare_items() {
global $status, $plugins, $totals, $page, $orderby, $order, $s;
@@ -241,6 +254,10 @@ class WP_Plugins_List_Table extends WP_List_Table {
return ( $a < $b ) ? -1 : 1;
}
+ /**
+ *
+ * @global array $plugins
+ */
public function no_items() {
global $plugins;
@@ -250,6 +267,11 @@ class WP_Plugins_List_Table extends WP_List_Table {
_e( 'You do not appear to have any plugins available at this time.' );
}
+ /**
+ *
+ * @global string $status
+ * @return array
+ */
public function get_columns() {
global $status;
@@ -264,6 +286,12 @@ class WP_Plugins_List_Table extends WP_List_Table {
return array();
}
+ /**
+ *
+ * @global array $totals
+ * @global string $status
+ * @return array
+ */
protected function get_views() {
global $totals, $status;
@@ -308,6 +336,11 @@ class WP_Plugins_List_Table extends WP_List_Table {
return $status_links;
}
+ /**
+ *
+ * @global string $status
+ * @return array
+ */
protected function get_bulk_actions() {
global $status;
@@ -373,6 +406,10 @@ class WP_Plugins_List_Table extends WP_List_Table {
return parent::current_action();
}
+ /**
+ *
+ * @global string $status
+ */
public function display_rows() {
global $status;
diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php
index 4bd51d39ab..6389b1d5b4 100644
--- a/wp-admin/includes/class-wp-posts-list-table.php
+++ b/wp-admin/includes/class-wp-posts-list-table.php
@@ -55,6 +55,9 @@ class WP_Posts_List_Table extends WP_List_Table {
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
+ * @global object $post_type_object
+ * @global wpdb $wpdb
+ *
* @param array $args An associative array of arguments.
*/
public function __construct( $args = array() ) {
@@ -101,6 +104,13 @@ class WP_Posts_List_Table extends WP_List_Table {
return current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_posts );
}
+ /**
+ *
+ * @global array $avail_post_stati
+ * @global WP_Query $wp_query
+ * @global int $per_page
+ * @global string $mode
+ */
public function prepare_items() {
global $avail_post_stati, $wp_query, $per_page, $mode;
@@ -163,6 +173,12 @@ class WP_Posts_List_Table extends WP_List_Table {
}
}
+ /**
+ *
+ * @global array $locked_post_status This seems to be deprecated.
+ * @global array $avail_post_stati
+ * @return array
+ */
protected function get_views() {
global $locked_post_status, $avail_post_stati;
@@ -467,7 +483,8 @@ class WP_Posts_List_Table extends WP_List_Table {
}
/**
- * @global wpdb $wpdb
+ * @global wpdb $wpdb
+ * @global WP_Post $post
* @param array $pages
* @param int $pagenum
* @param int $per_page
@@ -628,7 +645,9 @@ class WP_Posts_List_Table extends WP_List_Table {
}
/**
- * @global string $mode
+ * @global string $mode
+ * @global WP_Post $post
+ *
* @param WP_Post $post
* @param int $level
*/
@@ -991,6 +1010,8 @@ class WP_Posts_List_Table extends WP_List_Table {
* Outputs the hidden row displayed when inline editing
*
* @since 3.1.0
+ *
+ * @global string $mode
*/
public function inline_edit() {
global $mode;
diff --git a/wp-admin/includes/class-wp-press-this.php b/wp-admin/includes/class-wp-press-this.php
index dc4f3a3b00..39ae6bb6b6 100644
--- a/wp-admin/includes/class-wp-press-this.php
+++ b/wp-admin/includes/class-wp-press-this.php
@@ -1148,6 +1148,10 @@ class WP_Press_This {
*
* @since 4.2.0
* @access public
+ *
+ * @global WP_Locale $wp_locale
+ * @global string $wp_version
+ * @global bool $is_IE
*/
public function html() {
global $wp_locale, $wp_version;
@@ -1463,4 +1467,8 @@ class WP_Press_This {
}
}
+/**
+ *
+ * @global WP_Press_This $wp_press_this
+ */
$GLOBALS['wp_press_this'] = new WP_Press_This;
diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php
index 5eda18691c..25485bb8aa 100644
--- a/wp-admin/includes/class-wp-terms-list-table.php
+++ b/wp-admin/includes/class-wp-terms-list-table.php
@@ -21,6 +21,11 @@ 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 $action
+ * @global object $tax
+ *
* @param array $args An associative array of arguments.
*/
public function __construct( $args = array() ) {
diff --git a/wp-admin/includes/class-wp-theme-install-list-table.php b/wp-admin/includes/class-wp-theme-install-list-table.php
index e90f144d77..7c9d3519ec 100644
--- a/wp-admin/includes/class-wp-theme-install-list-table.php
+++ b/wp-admin/includes/class-wp-theme-install-list-table.php
@@ -15,6 +15,14 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
return current_user_can( 'install_themes' );
}
+ /**
+ *
+ * @global array $tabs
+ * @global string $tab
+ * @global int $paged
+ * @global string $type
+ * @global array $theme_field_defaults
+ */
public function prepare_items() {
include( ABSPATH . 'wp-admin/includes/theme-install.php' );
@@ -137,6 +145,12 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
_e( 'No themes match your request.' );
}
+ /**
+ *
+ * @global array $tabs
+ * @global string $tab
+ * @return array
+ */
protected function get_views() {
global $tabs, $tab;
@@ -191,6 +205,8 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
/**
* Prints a theme from the WordPress.org API.
*
+ * @global array $themes_allowedtags
+ *
* @param object $theme An object that contains theme data returned by the WordPress.org API.
*
* Example theme data:
@@ -332,6 +348,8 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
/**
* Prints the info for a theme (to be used in the theme installer modal).
*
+ * @global array $themes_allowedtags
+ *
* @param object $theme - A WordPress.org Theme API object.
*/
public function install_theme_info( $theme ) {
@@ -396,8 +414,8 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
* @since 3.4.0
* @access public
*
- * @uses $tab Global; current tab within Themes->Install screen
- * @uses $type Global; type of search.
+ * @global string $tab Current tab within Themes->Install screen
+ * @global string $type Type of search.
*/
public function _js_vars( $extra_args = array() ) {
global $tab, $type;
diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php
index acab417d3b..86227e3792 100644
--- a/wp-admin/includes/class-wp-upgrader.php
+++ b/wp-admin/includes/class-wp-upgrader.php
@@ -142,6 +142,8 @@ class WP_Upgrader {
*
* @since 2.8.0
*
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
* @param array $directories Optional. A list of directories. If any of these do
* not exist, a {@see WP_Error} object will be returned.
* Default empty array.
@@ -244,6 +246,8 @@ class WP_Upgrader {
*
* @since 2.8.0
*
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
* @param string $package Full path to the package file.
* @param bool $delete_package Optional. Whether to delete the package file after attempting
* to unpack it. Default true.
@@ -297,6 +301,9 @@ class WP_Upgrader {
*
* @since 2.8.0
*
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ * @global array $wp_theme_directories
+ *
* @param array|string $args {
* Optional. Array or string of arguments for installing a package. Default empty array.
*
@@ -626,6 +633,8 @@ class WP_Upgrader {
*
* @since 2.8.0
*
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
* @param bool $enable True to enable maintenance mode, false to disable.
*/
public function maintenance_mode( $enable = false ) {
@@ -957,6 +966,8 @@ class Plugin_Upgrader extends WP_Upgrader {
*
* @since 3.3.0
*
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
* @param string $source The path to the downloaded package source.
* @return string|WP_Error The source as passed, or a {@see WP_Error} object if no plugins were found.
*/
@@ -1050,6 +1061,8 @@ class Plugin_Upgrader extends WP_Upgrader {
* {@see Plugin_Upgrader::upgrade()} and {@see Plugin_Upgrader::bulk_upgrade()}.
*
* @since 2.8.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
*/
public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
global $wp_filesystem;
@@ -1472,6 +1485,8 @@ class Theme_Upgrader extends WP_Upgrader {
*
* @since 3.3.0
*
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
* @param string $source The full path to the package source.
* @return string|WP_Error The source or a WP_Error.
*/
@@ -1563,6 +1578,8 @@ class Theme_Upgrader extends WP_Upgrader {
* and {@see Theme_Upgrader::bulk_upgrade()}.
*
* @since 2.8.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
*/
public function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) {
global $wp_filesystem;
@@ -1735,6 +1752,8 @@ class Language_Pack_Upgrader extends WP_Upgrader {
*
* @since 3.7.0
*
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
* @param array $language_updates Optional. Language pack updates. Default empty array.
* @param array $args {
* Optional. Other arguments for upgrading multiple language packs. Default empty array
@@ -1859,6 +1878,8 @@ class Language_Pack_Upgrader extends WP_Upgrader {
* {@see Language_Pack_Upgrader::bulk_upgrade()}.
*
* @since 3.7.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
*/
public function check_package( $source, $remote_source ) {
global $wp_filesystem;
@@ -1945,6 +1966,9 @@ class Core_Upgrader extends WP_Upgrader {
*
* @since 2.8.0
*
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ * @global callback $_wp_filesystem_direct_method
+ *
* @param object $current Response object for whether WordPress is current.
* @param array $args {
* Optional. Arguments for upgrading WordPress core. Default empty array.
@@ -2218,6 +2242,9 @@ class Core_Upgrader extends WP_Upgrader {
*
* @since 3.7.0
*
+ * @global string $wp_version
+ * @global string $wp_local_package
+ *
* @return bool True if the checksums match, otherwise false.
*/
public function check_files() {
@@ -2463,6 +2490,8 @@ class WP_Automatic_Updater {
*
* @since 3.7.0
*
+ * @global wpdb $wpdb
+ *
* @param string $type The type of update being checked: 'core', 'theme',
* 'plugin', 'translation'.
* @param object $item The update offer.
@@ -2687,6 +2716,9 @@ class WP_Automatic_Updater {
* Kicks off the background update process, looping through all pending updates.
*
* @since 3.7.0
+ *
+ * @global wpdb $wpdb
+ * @global string $wp_version
*/
public function run() {
global $wpdb, $wp_version;
@@ -2822,6 +2854,8 @@ class WP_Automatic_Updater {
* If we tried to perform a core update, check if we should send an email,
* and if we need to avoid processing future updates.
*
+ * @global string $wp_version
+ *
* @param object $update_result The result of the core update. Includes the update offer and result.
*/
protected function after_core_update( $update_result ) {
@@ -2909,6 +2943,8 @@ class WP_Automatic_Updater {
*
* @since 3.7.0
*
+ * @global string $wp_version
+ *
* @param string $type The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'.
* @param object $core_update The update offer that was attempted.
* @param mixed $result Optional. The result for the core update. Can be WP_Error.
diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php
index 5006736370..7271c75f93 100644
--- a/wp-admin/includes/class-wp-users-list-table.php
+++ b/wp-admin/includes/class-wp-users-list-table.php
@@ -69,6 +69,9 @@ class WP_Users_List_Table extends WP_List_Table {
*
* @since 3.1.0
* @access public
+ *
+ * @global string $role
+ * @global string $usersearch
*/
public function prepare_items() {
global $role, $usersearch;
@@ -133,10 +136,14 @@ class WP_Users_List_Table extends WP_List_Table {
* @since 3.1.0
* @access protected
*
+ * @global string $role
+ *
* @return array An array of HTML links, one for each view.
*/
protected function get_views() {
- global $wp_roles, $role;
+ global $role;
+
+ $wp_roles = wp_roles();
if ( $this->is_site_users ) {
$url = 'site-users.php?id=' . $this->site_id;
@@ -329,8 +336,6 @@ class WP_Users_List_Table extends WP_List_Table {
* @since 4.2.0 The `$style` argument was deprecated.
* @access public
*
- * @global WP_Roles $wp_roles User roles object.
- *
* @param object $user_object The current user object.
* @param string $style Deprecated. Not used.
* @param string $role Optional. Key for the $wp_roles array. Default empty.
@@ -339,7 +344,7 @@ class WP_Users_List_Table extends WP_List_Table {
* @return string Output for a single row.
*/
public function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
- global $wp_roles;
+ $wp_roles = wp_roles();
if ( ! ( $user_object instanceof WP_User ) ) {
$user_object = get_userdata( (int) $user_object );
diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php
index 06447d41d0..bce6522629 100644
--- a/wp-admin/includes/comment.php
+++ b/wp-admin/includes/comment.php
@@ -156,7 +156,8 @@ function get_pending_comments_num( $post_id ) {
* Add avatars to relevant places in admin, or try to.
*
* @since 2.5.0
- * @uses $comment
+ *
+ * @global object $comment
*
* @param string $name User name.
* @return string Avatar with Admin name.
diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
index 6078353450..f52baff2c7 100644
--- a/wp-admin/includes/dashboard.php
+++ b/wp-admin/includes/dashboard.php
@@ -12,6 +12,10 @@
* Handles POST data, sets up filters.
*
* @since 2.5.0
+ *
+ * @global array $wp_registered_widgets
+ * @global array $wp_registered_widget_controls
+ * @global array $wp_dashboard_control_callbacks
*/
function wp_dashboard_setup() {
global $wp_registered_widgets, $wp_registered_widget_controls, $wp_dashboard_control_callbacks;
@@ -125,6 +129,16 @@ function wp_dashboard_setup() {
do_action( 'do_meta_boxes', $screen->id, 'side', '' );
}
+/**
+ *
+ * @global array $wp_dashboard_control_callbacks
+ *
+ * @param string $widget_id
+ * @param string $widget_name
+ * @param callback $callback
+ * @param callback $control_callback
+ * @param array $callback_args
+ */
function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) {
$screen = get_current_screen();
global $wp_dashboard_control_callbacks;
@@ -413,6 +427,8 @@ function wp_network_dashboard_right_now() {
*
* @since 3.8.0
*
+ * @global int $post_ID
+ *
* @param string $error_msg Optional. Error message. Default false.
*/
function wp_dashboard_quick_press( $error_msg = false ) {
@@ -517,6 +533,12 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
echo "\n";
}
+/**
+ * @global object $comment
+ *
+ * @param object $comment
+ * @param bool $show_date
+ */
function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
$GLOBALS['comment'] =& $comment;
@@ -874,6 +896,8 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar
*
* @since 2.5.0
*
+ * @global array $wp_dashboard_control_callbacks
+ *
* @param int $widget_control_id Registered Widget ID.
*/
function wp_dashboard_trigger_widget_control( $widget_control_id = false ) {
@@ -1231,6 +1255,8 @@ function dashboard_browser_nag_class( $classes ) {
*
* @since 3.2.0
*
+ * @global string $wp_version
+ *
* @return array|bool False on failure, array of browser data on success.
*/
function wp_check_browser_version() {
diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php
index cd50e61bb1..a826c7d394 100644
--- a/wp-admin/includes/export.php
+++ b/wp-admin/includes/export.php
@@ -20,6 +20,9 @@ define( 'WXR_VERSION', '1.2' );
*
* @since 2.1.0
*
+ * @global wpdb $wpdb
+ * @global WP_Post $post
+ *
* @param array $args Filters defining what should be included in the export.
*/
function export_wp( $args = array() ) {
@@ -244,6 +247,8 @@ function export_wp( $args = array() ) {
*
* @since 3.1.0
*
+ * @global wpdb $wpdb
+ *
* @param array $post_ids Array of post IDs to filter the query by. Optional.
*/
function wxr_authors_list( array $post_ids = null ) {
@@ -375,6 +380,9 @@ function export_wp( $args = array() ) {
?>
*
* @since 1.0.1
*
+ * @global object $link
+ *
* @param string $class
* @param string $value
* @param mixed $deprecated Never used.
diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php
index 367611b075..55c732381f 100644
--- a/wp-admin/includes/misc.php
+++ b/wp-admin/includes/misc.php
@@ -38,6 +38,8 @@ function got_mod_rewrite() {
*
* @since 3.7.0
*
+ * @global bool $is_nginx
+ *
* @return bool Whether the server supports URL rewriting.
*/
function got_url_rewrite() {
@@ -153,6 +155,8 @@ function insert_with_markers( $filename, $marker, $insertion ) {
* blank out old rules.
*
* @since 1.5.0
+ *
+ * @global WP_Rewrite $wp_rewrite
*/
function save_mod_rewrite_rules() {
if ( is_multisite() )
@@ -183,6 +187,8 @@ function save_mod_rewrite_rules() {
*
* @since 2.8.0
*
+ * @global WP_Rewrite $wp_rewrite
+ *
* @return bool True if web.config was updated successfully
*/
function iis7_save_url_rewrite_rules(){
@@ -593,6 +599,8 @@ function saveDomDocument($doc, $filename) {
* Display the default admin color scheme picker (Used in user-edit.php)
*
* @since 3.0.0
+ *
+ * @global array $_wp_admin_css_colors
*/
function admin_color_scheme_picker( $user_id ) {
global $_wp_admin_css_colors;
@@ -646,6 +654,10 @@ function admin_color_scheme_picker( $user_id ) {
roles;
+ $all_roles = wp_roles()->roles;
/**
* Filter the list of editable roles.
@@ -236,6 +234,8 @@ function get_user_to_edit( $user_id ) {
*
* @since 2.0.0
*
+ * @global wpdb $wpdb
+ *
* @param int $user_id User ID.
* @return array
*/
@@ -264,6 +264,8 @@ function get_users_drafts( $user_id ) {
*
* @since 2.0.0
*
+ * @global wpdb $wpdb
+ *
* @param int $id User ID.
* @param int $reassign Optional. Reassign posts and links to new User ID.
* @return bool True when finished.
@@ -388,6 +390,12 @@ add_action('admin_init', 'default_password_nag_handler');
/**
* @since 2.8.0
*/
+/**
+ *
+ * @global int $user_ID
+ *
+ * @param false $errors Deprecated.
+ */
function default_password_nag_handler($errors = false) {
global $user_ID;
// Short-circuit it.
@@ -424,6 +432,8 @@ add_action('admin_notices', 'default_password_nag');
/**
* @since 2.8.0
+ *
+ * @global string $pagenow
*/
function default_password_nag() {
global $pagenow;
diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php
index e3b231bb88..b01ccf5cf6 100644
--- a/wp-admin/includes/widgets.php
+++ b/wp-admin/includes/widgets.php
@@ -10,6 +10,9 @@
* Display list of the available widgets.
*
* @since 2.5.0
+ *
+ * @global array $wp_registered_widgets
+ * @global array $wp_registered_widget_controls
*/
function wp_list_widgets() {
global $wp_registered_widgets, $wp_registered_widget_controls;
@@ -99,6 +102,8 @@ function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) {
*
* @since 2.5.0
*
+ * @global array $wp_registered_widgets
+ *
* @param array $params
* @return array
*/
@@ -123,7 +128,14 @@ function wp_list_widget_controls_dynamic_sidebar( $params ) {
return $params;
}
-function next_widget_id_number($id_base) {
+/**
+ *
+ * @global array $wp_registered_widgets
+ *
+ * @param string $id_base
+ * @return int
+ */
+function next_widget_id_number( $id_base ) {
global $wp_registered_widgets;
$number = 1;
@@ -143,6 +155,10 @@ function next_widget_id_number($id_base) {
*
* @since 2.5.0
*
+ * @global array $wp_registered_widgets
+ * @global array $wp_registered_widget_controls
+ * @global array $sidebars_widgets
+ *
* @param array $sidebar_args
* @return array
*/
diff --git a/wp-admin/install-helper.php b/wp-admin/install-helper.php
index b64494af44..c0555de32c 100644
--- a/wp-admin/install-helper.php
+++ b/wp-admin/install-helper.php
@@ -154,6 +154,8 @@ function maybe_drop_column($table_name, $column_name, $drop_ddl) {
*
* @since 1.0.0
*
+ * @global wpdb $wpdb
+ *
* @param string $table_name Table name
* @param string $col_name Column name
* @param string $col_type Column type
diff --git a/wp-admin/install.php b/wp-admin/install.php
index 6f317cfbe5..037de88967 100644
--- a/wp-admin/install.php
+++ b/wp-admin/install.php
@@ -159,6 +159,12 @@ if ( is_blog_installed() ) {
die( '' . __( 'Already Installed' ) . '
' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '
' . __( 'Log In' ) . '