From 939d9b739551c43fc796db2a483e9716f8bbe985 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 22 Sep 2015 20:27:25 +0000 Subject: [PATCH] Remove some unused globals and/or their docs. See ##33491. Built from https://develop.svn.wordpress.org/trunk@34446 git-svn-id: http://core.svn.wordpress.org/trunk@34410 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-media-list-table.php | 2 -- wp-includes/canonical.php | 3 +-- wp-includes/comment-functions.php | 1 - wp-includes/post-functions.php | 3 +-- wp-includes/post-template.php | 3 +-- wp-includes/taxonomy-functions.php | 2 -- wp-includes/user-functions.php | 1 - wp-includes/version.php | 2 +- 8 files changed, 4 insertions(+), 13 deletions(-) diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index b7c705f685..def950f2bf 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -77,8 +77,6 @@ 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 diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index 0818124973..30b6f6b8b4 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -533,12 +533,11 @@ function _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $ur * @since 2.3.0 * * @global wpdb $wpdb WordPress database abstraction object. - * @global WP_Rewrite $wp_rewrite * * @return false|string The correct URL if one is found. False on failure. */ function redirect_guess_404_permalink() { - global $wpdb, $wp_rewrite; + global $wpdb; if ( get_query_var('name') ) { $where = $wpdb->prepare("post_name LIKE %s", $wpdb->esc_like( get_query_var('name') ) . '%'); diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index dcffb1524d..10d9a803e8 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -162,7 +162,6 @@ function get_approved_comments( $post_id, $args = array() ) { * * @since 2.0.0 * - * @global wpdb $wpdb WordPress database abstraction object. * @global object $comment * * @param WP_Comment|string|int $comment Comment to retrieve. diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php index 04669eeab8..c2b71dd501 100644 --- a/wp-includes/post-functions.php +++ b/wp-includes/post-functions.php @@ -5406,12 +5406,11 @@ function update_post_cache( &$posts ) { * @since 2.0.0 * * @global bool $_wp_suspend_cache_invalidation - * @global wpdb $wpdb WordPress database abstraction object. * * @param int|WP_Post $post Post ID or post object to remove from the cache. */ function clean_post_cache( $post ) { - global $_wp_suspend_cache_invalidation, $wpdb; + global $_wp_suspend_cache_invalidation; if ( ! empty( $_wp_suspend_cache_invalidation ) ) return; diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index f152fbdba0..99deacc22b 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -528,13 +528,12 @@ function body_class( $class = '' ) { * @since 2.8.0 * * @global WP_Query $wp_query - * @global wpdb $wpdb * * @param string|array $class One or more classes to add to the class list. * @return array Array of classes. */ function get_body_class( $class = '' ) { - global $wp_query, $wpdb; + global $wp_query; $classes = array(); diff --git a/wp-includes/taxonomy-functions.php b/wp-includes/taxonomy-functions.php index e819a21f64..9be3cab524 100644 --- a/wp-includes/taxonomy-functions.php +++ b/wp-includes/taxonomy-functions.php @@ -3869,8 +3869,6 @@ function _wp_check_split_terms_in_menus( $term_id, $new_term_id, $term_taxonomy_ * @ignore * @since 4.3.0 * - * @global wpdb $wpdb - * * @param int $term_id ID of the formerly shared term. * @param int $new_term_id ID of the new term created for the $term_taxonomy_id. * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split. diff --git a/wp-includes/user-functions.php b/wp-includes/user-functions.php index 6ee1917ef9..39949bee7f 100644 --- a/wp-includes/user-functions.php +++ b/wp-includes/user-functions.php @@ -859,7 +859,6 @@ function setup_userdata($for_user_id = '') { * * @since 2.3.0 * - * @global wpdb $wpdb WordPress database object for queries. * @global int $blog_id * * @param array|string $args { diff --git a/wp-includes/version.php b/wp-includes/version.php index fbb2af94f5..94afe44d2b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34445'; +$wp_version = '4.4-alpha-34446'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.