Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: sites_clauses

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
645
646           /**
647            * Filters the site query clauses.
648            *
649            * @since 4.6.0
650            *
651            * @param string[]      $pieces An associative array of site query clauses.
652            * @param WP_Site_Query $query  Current instance of WP_Site_Query (passed by reference).
653            */
654           $clauses = apply_filters_ref_array( 'sites_clauses', array( compact( $pieces ), &$this ) );
655
656           $fields  = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
657           $join    = isset( $clauses['join'] ) ? $clauses['join'] : '';
658           $where   = isset( $clauses['where'] ) ? $clauses['where'] : '';
659           $orderby = isset( $clauses['orderby'] ) ? $clauses['orderby'] : '';
660           $limits  = isset( $clauses['limits'] ) ? $clauses['limits'] : '';
661           $groupby = isset( $clauses['groupby'] ) ? $clauses['groupby'] : '';
662
663           if ( $where ) {