list_terms_exclusions

list_terms_exclusions

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

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('list_terms_exclusions') is found 1 times:

  • /wp-includes/class-wp-term-query.php line 537
    		 * @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 );
    		}