WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/03/2019 03:34:54 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Fix deprecated calls to get_terms().

The taxonomy should be passed as part of $args, rather than as its own argument.

Props sgastard, mukesh27, SergeyBiryukov.
Fixes #47819.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r45599 r45723  
    15581558                    if ( is_taxonomy_hierarchical( $taxonomy ) ) {
    15591559                        $tax_term_names = get_terms(
    1560                             $taxonomy,
    15611560                            array(
     1561                                'taxonomy'   => $taxonomy,
    15621562                                'fields'     => 'names',
    15631563                                'hide_empty' => false,
     
    23912391        }
    23922392
    2393         $query = array();
     2393        $query = array( 'taxonomy' => $taxonomy->name );
    23942394
    23952395        if ( isset( $filter['number'] ) ) {
     
    24192419        }
    24202420
    2421         $terms = get_terms( $taxonomy->name, $query );
     2421        $terms = get_terms( $query );
    24222422
    24232423        if ( is_wp_error( $terms ) ) {
Note: See TracChangeset for help on using the changeset viewer.