Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: list_terms_exclusions

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1783      /**
1784       * Filter the terms to exclude from the terms query.
1785       *
1786       * @since 2.3.0
1787       *
1788       * @param string       $exclusions NOT IN clause of the terms query.
1789       * @param array        $args       An array of terms query arguments.
1790       * @param string|array $taxonomies A taxonomy or array of taxonomies.
1791       */
1792      $exclusions = apply_filters( 'list_terms_exclusions', $exclusions, $args, $taxonomies );
1793
1794      if ( ! empty( $exclusions ) ) {
1795           $where .= $exclusions;
1796      }
1797
1798      if ( ! empty( $args['slug'] ) ) {
1799           if ( is_array( $args['slug'] ) ) {
1800                $slug = array_map( 'sanitize_title', $args['slug'] );
1801                $where .= " AND t.slug IN ('" . implode( "', '", $slug ) . "')";