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-admin/includes/ajax-actions.php

    r45654 r45723  
    152152
    153153    $results = get_terms(
    154         $taxonomy,
    155154        array(
     155            'taxonomy'   => $taxonomy,
    156156            'name__like' => $s,
    157157            'fields'     => 'names',
     
    10861086
    10871087    $tags = get_terms(
    1088         $taxonomy,
    10891088        array(
    1090             'number'  => 45,
    1091             'orderby' => 'count',
    1092             'order'   => 'DESC',
     1089            'taxonomy' => $taxonomy,
     1090            'number'   => 45,
     1091            'orderby'  => 'count',
     1092            'order'    => 'DESC',
    10931093        )
    10941094    );
Note: See TracChangeset for help on using the changeset viewer.