Changeset 7919
- Timestamp:
- 02/18/2014 12:52:22 PM (11 years ago)
- Location:
- trunk/bp-blogs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-functions.php
r7918 r7919 45 45 46 46 $defaults = array( 47 'type' => 'active', // active, alphabetical, newest, or random48 'user_id' => false, // Pass a user_id to limit to only blogs that this user has privilages higher than subscriber on49 'search_terms' => false, // Limit to blogs that match these search terms50 'per_page' => 20, // The number of results to return per page51 'page' => 1, // The page to return if limiting per page47 'type' => 'active', // active, alphabetical, newest, or random 48 'user_id' => false, // Pass a user_id to limit to only blogs that this user has privilages higher than subscriber on 49 'search_terms' => false, // Limit to blogs that match these search terms 50 'per_page' => 20, // The number of results to return per page 51 'page' => 1, // The page to return if limiting per page 52 52 'update_meta_cache' => true, 53 53 ); -
trunk/bp-blogs/bp-blogs-template.php
r7918 r7919 178 178 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 179 179 180 if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] ) 180 if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] ) { 181 181 $this->blogs = BP_Blogs_Blog::get_by_letter( $_REQUEST['letter'], $this->pag_num, $this->pag_page ); 182 else 183 $this->blogs = bp_blogs_get_blogs( array( 'type' => $type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'search_terms' => $search_terms, 'update_meta_cache' => $update_meta_cache, ) ); 182 } else { 183 $this->blogs = bp_blogs_get_blogs( array( 184 'type' => $type, 185 'per_page' => $this->pag_num, 186 'page' => $this->pag_page, 187 'user_id' => $user_id, 188 'search_terms' => $search_terms, 189 'update_meta_cache' => $update_meta_cache, 190 ) ); 191 } 184 192 185 193 if ( !$max || $max >= (int) $this->blogs['total'] ) … … 354 362 355 363 $defaults = array( 356 'type' => $type,357 'page' => 1,358 'per_page' => 20,359 'max' => false,360 361 'page_arg' => 'bpage', // See https://buddypress.trac.wordpress.org/ticket/3679362 363 'user_id' => $user_id, // Pass a user_id to limit to only blogs this user has higher than subscriber access to364 'search_terms' => $search_terms, // Pass search terms to filter on the blog title or description.364 'type' => $type, 365 'page' => 1, 366 'per_page' => 20, 367 'max' => false, 368 369 'page_arg' => 'bpage', // See https://buddypress.trac.wordpress.org/ticket/3679 370 371 'user_id' => $user_id, // Pass a user_id to limit to only blogs this user has higher than subscriber access to 372 'search_terms' => $search_terms, // Pass search terms to filter on the blog title or description. 365 373 'update_meta_cache' => true, 366 374 );
Note: See TracChangeset
for help on using the changeset viewer.