Activity::count_group()
Description #
Count total items in a group.
Source #
File: includes/class/class-activity.php
public function count_group() { if ( $this->have_group_items() ) { $next = $this->current + 1; $count = 0; $current_obj = $this->object; $next_obj = $this->objects[ $next ]; for ( $i = $next; $i < $this->count; $i++ ) { if ( $current_obj->q_id == $next_obj->q_id ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual ++$count; } else { break; } if ( $i + 1 < $this->count ) { $current_obj = $this->objects[ $i ]; $next_obj = $this->objects[ $i + 1 ]; } } } return $count; }
Expand full source code Collapse full source code View on GitHub: includes/class/class-activity.php:342
Add your comment