WordPress.org

Make WordPress Core

Ticket #40696: 40696.diff

File 40696.diff, 497 bytes (added by jignashu, 5 months ago)

Added filter to modify wp_count_terms arguments.

  • src/wp-includes/taxonomy.php

    diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
    index 370cb46ad5..30ab45c351 100644
    function wp_count_terms( $taxonomy, $args = array() ) { 
    17021702        }
    17031703
    17041704        $args['fields'] = 'count';
     1705       
     1706        $args = apply_filters( 'wp_modify_count_terms' , $args , $taxonomy );
    17051707
    17061708        return get_terms( $args );
    17071709}
    function wp_check_term_meta_support_prefilter( $check ) { 
    46454647
    46464648        return $check;
    46474649}
     4650