Changeset 7087 for trunk/bp-groups/bp-groups-template.php
- Timestamp:
- 05/19/2013 12:09:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-template.php
r6951 r7087 167 167 $this->groups = groups_get_groups( array( 168 168 'type' => $type, 169 'order' => $order, 170 'orderby' => $orderby, 169 171 'per_page' => $this->pag_num, 170 172 'page' => $this->pag_page, … … 267 269 } 268 270 271 /** 272 * Start the Groups Template Loop 273 * 274 * See the $defaults definition below for a description of parameters. 275 * 276 * Note that the 'type' parameter overrides 'order' and 'orderby'. See 277 * BP_Groups_Group::get() for more details. 278 * 279 * @param array $args 280 * @return bool True if there are groups to display that match the params 281 */ 269 282 function bp_has_groups( $args = '' ) { 270 283 global $groups_template, $bp; … … 276 289 */ 277 290 $slug = false; 278 $type = ' active';291 $type = ''; 279 292 $user_id = 0; 280 293 $order = ''; … … 285 298 286 299 // Type 300 // @todo What is $order? At some point it was removed incompletely? 287 301 if ( bp_is_current_action( 'my-groups' ) ) { 288 302 if ( 'most-popular' == $order ) { … … 299 313 300 314 $defaults = array( 301 'type' => $type, 315 'type' => $type, // 'type' is an override for 'order' and 'orderby'. See docblock. 316 'order' => 'DESC', 317 'orderby' => 'last_activity', 302 318 'page' => 1, 303 319 'per_page' => 20, … … 314 330 'exclude' => false, // Pass comma separated list or array of group ID's to exclude these groups 315 331 316 'populate_extras' => true 332 'populate_extras' => true, // Get extra meta - is_member, is_banned 317 333 ); 318 334 … … 330 346 $groups_template = new BP_Groups_Template( array( 331 347 'type' => $r['type'], 348 'order' => $r['order'], 349 'orderby' => $r['orderby'], 332 350 'page' => (int) $r['page'], 333 351 'per_page' => (int) $r['per_page'],
Note: See TracChangeset
for help on using the changeset viewer.