Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: posts_where

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
1180                if ( is_user_logged_in() ) {
1181                     $where .= current_user_can( "read_private_{$post_type}s" ) ? " OR post_status = 'private'" : " OR post_author = $user_ID AND post_status = 'private'";
1182                }
1183
1184                $where .= ')';
1185           }
1186
1187           // Apply filters on where and join prior to paging so that any
1188           // manipulations to them are reflected in the paging by day queries.
1189           $where = apply_filters('posts_where', $where);
1190           $join = apply_filters('posts_join', $join);
1191
1192           // Paging
1193           if ( empty($q['nopaging']) && !$this->is_singular ) {
1194                $page = abs(intval($q['paged']));
1195                if (empty($page)) {
1196                     $page = 1;
1197                }
1198