WordPress.org

Make WordPress Core

Ticket #40696: 40696.4.diff

File 40696.4.diff, 614 bytes (added by jignashu, 7 weeks ago)

Changed the name of the filter as well as added block comments for that filter.

  • src/wp-includes/taxonomy.php

    diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
    index 370cb46ad5..b03ca2c4f5 100644
    function wp_count_terms( $taxonomy, $args = array() ) { 
    17021702        }
    17031703
    17041704        $args['fields'] = 'count';
     1705        /**
     1706         * Filter arguments for retrieving count terms
     1707         *
     1708         * @param array     $args       An array of arguments for retrieving count of the terms for the given taxonomy
     1709         * @param string    $taxnomoy   Taxonomy name
     1710         */
     1711        $args = apply_filters( 'wp_count_terms_args', $args, $taxonomy );
    17051712
    17061713        return get_terms( $args );
    17071714}