- Timestamp:
- 08/26/2021 12:53:27 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/classes/class-bp-messages-box-template.php
r12602 r13096 4 4 * 5 5 * @package BuddyPress 6 * @subpackage Messages Template6 * @subpackage MessagesClasses 7 7 * @since 1.5.0 8 8 */ … … 47 47 * The thread object currently being iterated on. 48 48 * 49 * @var object49 * @var BP_Messages_Thread|bool 50 50 */ 51 51 public $thread = false; … … 105 105 * @param array $args { 106 106 * Array of arguments. See bp_has_message_threads() for full description. 107 * } 107 * }. 108 108 */ 109 109 public function __construct( $args = array() ) { … … 230 230 */ 231 231 public function has_threads() { 232 if ( $this->thread_count ) { 233 return true; 234 } 235 236 return false; 232 return ( $this->thread_count ); 237 233 } 238 234 … … 240 236 * Set up the next member and iterate index. 241 237 * 242 * @return objectThe next member to iterate over.238 * @return BP_Messages_Thread The next member to iterate over. 243 239 */ 244 240 public function next_thread() { 245 241 $this->current_thread++; 246 $this->thread = $this->threads[ $this->current_thread];242 $this->thread = $this->threads[ $this->current_thread ]; 247 243 248 244 return $this->thread; … … 270 266 * @return bool True if there are more threads to show, otherwise false. 271 267 */ 272 function message_threads() {268 public function message_threads() { 273 269 if ( $this->current_thread + 1 < $this->thread_count ) { 274 270 return true; 275 } elseif ( $this->current_thread + 1 == $this->thread_count ) {271 } elseif ( $this->current_thread + 1 === $this->thread_count ) { 276 272 277 273 /** … … 308 304 309 305 // Set up the last message data. 310 if ( count( $this->thread->messages) > 1 ) {306 if ( count( $this->thread->messages ) > 1 ) { 311 307 if ( 'inbox' == $this->box ) { 312 308 foreach ( (array) $this->thread->messages as $key => $message ) { … … 335 331 336 332 // Loop has just started. 337 if ( 0 == $this->current_thread ) {333 if ( 0 === $this->current_thread ) { 338 334 339 335 /**
Note: See TracChangeset
for help on using the changeset viewer.