Making WordPress.org


Ignore:
Timestamp:
04/22/2020 03:10:00 AM (6 years ago)
Author:
dd32
Message:

WordPress.TV: Include all empty terms in the API feeds.

Fixes #5165.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/plugins/wordpresstv-rest/wordpresstv-rest.php

    r9286 r9762  
    180180                                $taxonomy = $taxonomies[ $method ];
    181181                                $taxonomy_obj = get_taxonomy( $taxonomy );
    182                                 $total_count = wp_count_terms( $taxonomy, array( 'hide_empty' => true ) );
     182                                $total_count = wp_count_terms( $taxonomy, array( 'hide_empty' => false ) );
    183183
    184184                                $page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
     
    187187                                $terms = get_terms( array(
    188188                                        'taxonomy'   => $taxonomy,
    189                                         'hide_empty' => true,
     189                                        'hide_empty' => false,
    190190                                        'number'     => $per_page,
    191191                                        'offset'     => $per_page * ($page - 1),
Note: See TracChangeset for help on using the changeset viewer.