Skip to content

Commit d416922

Browse files
committed
Remove some unused globals and/or their docs.
See ##33491. git-svn-id: https://develop.svn.wordpress.org/trunk@34446 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e2ce2d9 commit d416922

7 files changed

Lines changed: 3 additions & 12 deletions

File tree

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ public function prepare_items() {
7777
}
7878

7979
/**
80-
*
81-
* @global wpdb $wpdb
8280
* @global array $post_mime_types
8381
* @global array $avail_post_mime_types
8482
* @return array

src/wp-includes/canonical.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,12 +533,11 @@ function _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $ur
533533
* @since 2.3.0
534534
*
535535
* @global wpdb $wpdb WordPress database abstraction object.
536-
* @global WP_Rewrite $wp_rewrite
537536
*
538537
* @return false|string The correct URL if one is found. False on failure.
539538
*/
540539
function redirect_guess_404_permalink() {
541-
global $wpdb, $wp_rewrite;
540+
global $wpdb;
542541

543542
if ( get_query_var('name') ) {
544543
$where = $wpdb->prepare("post_name LIKE %s", $wpdb->esc_like( get_query_var('name') ) . '%');

src/wp-includes/comment-functions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ function get_approved_comments( $post_id, $args = array() ) {
162162
*
163163
* @since 2.0.0
164164
*
165-
* @global wpdb $wpdb WordPress database abstraction object.
166165
* @global object $comment
167166
*
168167
* @param WP_Comment|string|int $comment Comment to retrieve.

src/wp-includes/post-functions.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5406,12 +5406,11 @@ function update_post_cache( &$posts ) {
54065406
* @since 2.0.0
54075407
*
54085408
* @global bool $_wp_suspend_cache_invalidation
5409-
* @global wpdb $wpdb WordPress database abstraction object.
54105409
*
54115410
* @param int|WP_Post $post Post ID or post object to remove from the cache.
54125411
*/
54135412
function clean_post_cache( $post ) {
5414-
global $_wp_suspend_cache_invalidation, $wpdb;
5413+
global $_wp_suspend_cache_invalidation;
54155414

54165415
if ( ! empty( $_wp_suspend_cache_invalidation ) )
54175416
return;

src/wp-includes/post-template.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,13 +528,12 @@ function body_class( $class = '' ) {
528528
* @since 2.8.0
529529
*
530530
* @global WP_Query $wp_query
531-
* @global wpdb $wpdb
532531
*
533532
* @param string|array $class One or more classes to add to the class list.
534533
* @return array Array of classes.
535534
*/
536535
function get_body_class( $class = '' ) {
537-
global $wp_query, $wpdb;
536+
global $wp_query;
538537

539538
$classes = array();
540539

src/wp-includes/taxonomy-functions.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3869,8 +3869,6 @@ function _wp_check_split_terms_in_menus( $term_id, $new_term_id, $term_taxonomy_
38693869
* @ignore
38703870
* @since 4.3.0
38713871
*
3872-
* @global wpdb $wpdb
3873-
*
38743872
* @param int $term_id ID of the formerly shared term.
38753873
* @param int $new_term_id ID of the new term created for the $term_taxonomy_id.
38763874
* @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split.

src/wp-includes/user-functions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,6 @@ function setup_userdata($for_user_id = '') {
859859
*
860860
* @since 2.3.0
861861
*
862-
* @global wpdb $wpdb WordPress database object for queries.
863862
* @global int $blog_id
864863
*
865864
* @param array|string $args {

0 commit comments

Comments
 (0)