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/category-template.php

    r45668 r45723  
    385385    $get_terms_args = $parsed_args;
    386386    unset( $get_terms_args['name'] );
    387     $categories = get_terms( $parsed_args['taxonomy'], $get_terms_args );
     387    $categories = get_terms( $get_terms_args );
    388388
    389389    $name     = esc_attr( $parsed_args['name'] );
     
    702702
    703703    $tags = get_terms(
    704         $args['taxonomy'],
    705704        array_merge(
    706705            $args,
Note: See TracChangeset for help on using the changeset viewer.