Changeset 30982 for trunk/src/wp-includes/ms-deprecated.php
- Timestamp:
- 12/20/2014 10:46:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-deprecated.php
r30176 r30982 167 167 $blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A ); 168 168 169 $blog_list = array(); 169 170 foreach ( (array) $blogs as $details ) { 170 171 $blog_list[ $details['blog_id'] ] = $details; 171 172 $blog_list[ $details['blog_id'] ]['postcount'] = $wpdb->get_var( "SELECT COUNT(ID) FROM " . $wpdb->get_blog_prefix( $details['blog_id'] ). "posts WHERE post_status='publish' AND post_type='post'" ); 172 173 } 173 unset( $blogs ); 174 $blogs = $blog_list; 175 176 if ( false == is_array( $blogs ) ) 174 175 if ( ! $blog_list ) { 177 176 return array(); 178 179 if ( $num == 'all' ) 180 return array_slice( $blogs, $start, count( $blogs ) ); 181 else 182 return array_slice( $blogs, $start, $num ); 177 } 178 179 if ( $num == 'all' ) { 180 return array_slice( $blog_list, $start, count( $blog_list ) ); 181 } else { 182 return array_slice( $blog_list, $start, $num ); 183 } 183 184 } 184 185
Note: See TracChangeset
for help on using the changeset viewer.