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
529
530           /**
531            * Filters the site query clauses.
532            *
533            * @since 4.6.0
534            *
535            * @param array         $pieces A compacted array of site query clauses.
536            * @param WP_Site_Query $this   Current instance of WP_Site_Query (passed by reference).
537            */
538           $clauses = apply_filters_ref_array( 'sites_clauses', array( compact( $pieces ), &$this ) );
539
540           $fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
541           $join = isset( $clauses['join'] ) ? $clauses['join'] : '';
542           $where = isset( $clauses['where'] ) ? $clauses['where'] : '';
543           $orderby = isset( $clauses['orderby'] ) ? $clauses['orderby'] : '';
544           $limits = isset( $clauses['limits'] ) ? $clauses['limits'] : '';
545           $groupby = isset( $clauses['groupby'] ) ? $clauses['groupby'] : '';
546
547           if ( $where ) {