Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: ms_sites_per_page

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
349      default:
350           $pagenum = isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 0;
351           if ( empty($pagenum) )
352                $pagenum = 1;
353
354           $per_page = (int) get_user_option( 'ms_sites_per_page' );
355           if ( empty( $per_page ) || $per_page < 1 )
356                $per_page = 15;
357
358           $per_page = apply_filters( 'ms_sites_per_page', $per_page );
359
360           $s = isset( $_GET['s'] ) ? stripslashes( trim( $_GET[ 's' ] ) ) : '';
361           $like_s = esc_sql( like_escape( $s ) );
362
363           $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";
364
365           if ( isset( $_GET['searchaction'] ) ) {
366                if ( 'name' == $_GET['searchaction'] ) {
367                     $query .= " AND ( {$wpdb->blogs}.domain LIKE '%{$like_s}%' OR {$wpdb->blogs}.path LIKE '%{$like_s}%' ) ";