WordPress.org

Make WordPress Core

Changeset 41326


Ignore:
Timestamp:
08/31/17 12:25:14 (3 weeks ago)
Author:
ocean90
Message:

Taxonomy: Remove unused global imports for $wpdb in get_terms() and wp_get_object_terms().

Also remove incorrect @global tags for $wpdb and $wp_filter.

Fixes #41768.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r41280 r41326  
    727727 *              The `$taxonomy` parameter was made optional. 
    728728 * 
    729  * @global wpdb $wpdb WordPress database abstraction object. 
    730729 * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param. 
    731730 * 
     
    837836 *              a WP_Term object if `$output` is `OBJECT`. 
    838837 * 
    839  * @global wpdb $wpdb WordPress database abstraction object. 
    840838 * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param. 
    841839 * 
     
    10471045 * @internal The `$deprecated` parameter is parsed for backward compatibility only. 
    10481046 * 
    1049  * @global wpdb  $wpdb WordPress database abstraction object. 
    1050  * @global array $wp_filter 
    1051  * 
    10521047 * @param string|array $args       Optional. Array or string of arguments. See WP_Term_Query::__construct() 
    10531048 *                                 for information on accepted arguments. Default empty. 
     
    10591054 */ 
    10601055function get_terms( $args = array(), $deprecated = '' ) { 
    1061     global $wpdb; 
    1062  
    10631056    $term_query = new WP_Term_Query(); 
    10641057 
     
    18551848 * @since 4.7.0 Refactored to use WP_Term_Query, and to support any WP_Term_Query arguments. 
    18561849 * 
    1857  * @global wpdb $wpdb WordPress database abstraction object. 
    1858  * 
    18591850 * @param int|array    $object_ids The ID(s) of the object(s) to retrieve. 
    18601851 * @param string|array $taxonomies The taxonomies to retrieve terms from. 
     
    18641855 */ 
    18651856function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { 
    1866     global $wpdb; 
    1867  
    18681857    if ( empty( $object_ids ) || empty( $taxonomies ) ) 
    18691858        return array(); 
     
    38873876 * @param int $term_id Term ID. 
    38883877 * @return bool Returns false if a term is not shared between multiple taxonomies or 
    3889  *              if splittng shared taxonomy terms is finished.  
     3878 *              if splittng shared taxonomy terms is finished. 
    38903879 */ 
    38913880function wp_term_is_shared( $term_id ) { 
Note: See TracChangeset for help on using the changeset viewer.