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/deprecated.php

    r45674 r45723  
    12881288
    12891289    if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
    1290         $cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
     1290        $cat_ids = get_terms(
     1291            array(
     1292                'taxonomy' => 'category',
     1293                'fields'   => 'ids',
     1294                'get'      => 'all',
     1295            )
     1296        );
    12911297        wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
    12921298    }
Note: See TracChangeset for help on using the changeset viewer.