WordPress.org

Make WordPress Core

Ticket #40696: 40696.2.diff

File 40696.2.diff, 674 bytes (added by amitkumarsingh, 7 weeks ago)
  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index 370cb46ad5..696dfa6e18 100644
    a b function wp_count_terms( $taxonomy, $args = array() ) { 
    16931693                'taxonomy'   => $taxonomy,
    16941694                'hide_empty' => false,
    16951695        );
    1696         $args     = wp_parse_args( $args, $defaults );
     1696        /**
     1697         * This filter is used to filter the arguments for wp_count_terms query.
     1698         *
     1699         * @param array $args Count Term Query Arguments.
     1700         */
     1701        $args     = apply_filters( 'wp_count_terms_args', wp_parse_args( $args, $defaults ) );
    16971702
    16981703        // Backward compatibility.
    16991704        if ( isset( $args['ignore_empty'] ) ) {