- Timestamp:
- 09/11/2021 05:26:17 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-core-members-template.php
r12852 r13105 111 111 * 112 112 * @since 1.5.0 113 * @since 7.0.0 Added $xprofile_query parameter. Added $user_idsparameter.113 * @since 7.0.0 Added `$xprofile_query` parameter. Added `$user_ids` parameter. 114 114 * 115 115 * @see BP_User_Query for an in-depth description of parameters. 116 116 * 117 * @param array $args {117 * @param array ...$args { 118 118 * Array of arguments. Supports all arguments of BP_User_Query. Additional 119 119 * arguments, or those with different defaults, are described below. … … 268 268 * @return bool True if there are items in the loop, otherwise false. 269 269 */ 270 function has_members() { 271 if ( $this->member_count ) 272 return true; 273 274 return false; 270 public function has_members() { 271 return ! empty( $this->member_count ); 275 272 } 276 273 … … 282 279 * @return object The next member to iterate over. 283 280 */ 284 function next_member() {281 public function next_member() { 285 282 $this->current_member++; 286 $this->member = $this->members[ $this->current_member];283 $this->member = $this->members[ $this->current_member ]; 287 284 288 285 return $this->member; … … 294 291 * @since 1.0.0 295 292 */ 296 function rewind_members() {293 public function rewind_members() { 297 294 $this->current_member = -1; 298 295 if ( $this->member_count > 0 ) { … … 314 311 * @return bool True if there are more members to show, otherwise false. 315 312 */ 316 function members() {313 public function members() { 317 314 if ( $this->current_member + 1 < $this->member_count ) { 318 315 return true; 319 } elseif ( $this->current_member + 1 == $this->member_count ) {316 } elseif ( $this->current_member + 1 === $this->member_count ) { 320 317 321 318 /** … … 344 341 * @see bp_the_member() 345 342 */ 346 function the_member() { 347 343 public function the_member() { 348 344 $this->in_the_loop = true; 349 345 $this->member = $this->next_member(); 350 346 351 347 // Loop has just started. 352 if ( 0 == $this->current_member ) {348 if ( 0 === $this->current_member ) { 353 349 354 350 /** … … 359 355 do_action( 'member_loop_start' ); 360 356 } 361 362 357 } 363 358 }
Note: See TracChangeset
for help on using the changeset viewer.