WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/31/2010 11:02:17 AM (9 years ago)
Author:
scribu
Message:

use get_queried_object() wrappers throughout. See #14015

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r16100 r16114  
    466466        }
    467467    } else {
    468         global $wp_query;
    469 
    470468        if( !empty( $show_option_all ) )
    471469            if ( 'list' == $style )
     
    475473
    476474        if ( empty( $r['current_category'] ) && ( is_category() || is_tax() ) )
    477             $r['current_category'] = $wp_query->get_queried_object_id();
     475            $r['current_category'] = get_queried_object_id();
    478476
    479477        if ( $hierarchical )
     
    10261024function term_description( $term = 0, $taxonomy = 'post_tag' ) {
    10271025    if ( !$term && ( is_tax() || is_tag() || is_category() ) ) {
    1028         global $wp_query;
    1029         $term = $wp_query->get_queried_object();
     1026        $term = get_queried_object();
    10301027        $taxonomy = $term->taxonomy;
    10311028        $term = $term->term_id;
Note: See TracChangeset for help on using the changeset viewer.