Skip to:
Content

BuddyPress.org

Changeset 7919


Ignore:
Timestamp:
02/18/2014 12:52:22 PM (8 years ago)
Author:
boonebgorges
Message:

Normalize codestyling and whitespace in default params in bp-blogs

Location:
trunk/bp-blogs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-functions.php

    r7918 r7919  
    4545
    4646    $defaults = array(
    47         '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
     47        '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
    5252        'update_meta_cache' => true,
    5353    );
  • trunk/bp-blogs/bp-blogs-template.php

    r7918 r7919  
    178178        $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
    179179
    180         if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] )
     180        if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] ) {
    181181            $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        }
    184192
    185193        if ( !$max || $max >= (int) $this->blogs['total'] )
     
    354362
    355363    $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/3679
    362 
    363         'user_id'      => $user_id,       // Pass a user_id to limit to only blogs this user has higher than subscriber access to
    364         '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.
    365373        'update_meta_cache' => true,
    366374    );
Note: See TracChangeset for help on using the changeset viewer.