list_terms_exclusions

list_terms_exclusions

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('list_terms_exclusions') is found 1 times:

  • /wp-includes/class-wp-term-query.php line 534
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    * @param string   $exclusions `NOT IN` clause of the terms query.
     * @param array    $args       An array of terms query arguments.
     * @param string[] $taxonomies An array of taxonomy names.
     */
    $exclusions = apply_filters( 'list_terms_exclusions', $exclusions, $args, $taxonomies );
     
    if ( ! empty( $exclusions ) ) {
        // Strip leading 'AND'. Must do string manipulation here for backward compatibility with filter.
        $this->sql_clauses['where']['exclusions'] = preg_replace( '/^\s*AND\s*/', '', $exclusions );
    }