Make WordPress Core


Ignore:
Timestamp:
08/03/2019 03:34:54 AM (6 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-admin/includes/nav-menu.php

    r45583 r45723  
    664664
    665665    $args = array(
     666        'taxonomy'     => $taxonomy_name,
    666667        'child_of'     => 0,
    667668        'exclude'      => '',
     
    676677    );
    677678
    678     $terms = get_terms( $taxonomy_name, $args );
     679    $terms = get_terms( $args );
    679680
    680681    if ( ! $terms || is_wp_error( $terms ) ) {
     
    775776                <?php
    776777                $popular_terms  = get_terms(
    777                     $taxonomy_name,
    778778                    array(
     779                        'taxonomy'     => $taxonomy_name,
    779780                        'orderby'      => 'count',
    780781                        'order'        => 'DESC',
     
    813814                $searched       = esc_attr( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] );
    814815                $search_results = get_terms(
    815                     $taxonomy_name,
    816816                    array(
     817                        'taxonomy'     => $taxonomy_name,
    817818                        'name__like'   => $searched,
    818819                        'fields'       => 'all',
Note: See TracChangeset for help on using the changeset viewer.