Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/06/2015 08:59:17 PM (10 years ago)
Author:
boonebgorges
Message:

Pass template object to 'loop_start' and 'loop_end' actions in groups template classes.

Props tw2113.
Fixes #6228.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-template.php

    r9646 r9706  
    36803680        } elseif ( $tick == $this->member_count ) {
    36813681
    3682             do_action( 'loop_end' );
     3682            /**
     3683             * Fires right before the rewinding of members list.
     3684             *
     3685             * @since BuddyPress (1.0.0)
     3686             * @since BuddyPress (2.3.0) `$this` parameter added.
     3687             *
     3688             * @param BP_Groups_Group_Members_Template $this Instance of the current Members template.
     3689             */
     3690            do_action( 'loop_end', $this );
     3691
    36833692            // Do some cleaning up after the loop
    36843693            $this->rewind_members();
     
    36953704        // loop has just started
    36963705        if ( 0 == $this->current_member ) {
    3697             do_action( 'loop_start' );
     3706
     3707            /**
     3708             * Fires if the current member item is the first in the members list.
     3709             *
     3710             * @since BuddyPress (1.0.0)
     3711             * @since BuddyPress (2.3.0) `$this` parameter added.
     3712             *
     3713             * @param BP_Groups_Group_Members_Template $this Instance of the current Members template.
     3714             */
     3715            do_action( 'loop_start', $this );
    36983716        }
    36993717    }
     
    53345352            return true;
    53355353        } elseif ( $tick == $this->invite_count ) {
    5336             do_action( 'loop_end' );
     5354
     5355            /**
     5356             * Fires right before the rewinding of invites list.
     5357             *
     5358             * @since BuddyPress (1.1.0)
     5359             * @since BuddyPress (2.3.0) `$this` parameter added.
     5360             *
     5361             * @param BP_Groups_Invite_Template $this Instance of the current Invites template.
     5362             */
     5363            do_action( 'loop_end', $this );
     5364
    53375365            // Do some cleaning up after the loop
    53385366            $this->rewind_invites();
     
    53835411        // loop has just started
    53845412        if ( 0 == $this->current_invite ) {
    5385             do_action( 'loop_start' );
     5413
     5414            /**
     5415             * Fires if the current invite item is the first in the loop.
     5416             *
     5417             * @since BuddyPress (1.1.0)
     5418             * @since BuddyPress (2.3.0) `$this` parameter added.
     5419             *
     5420             * @param BP_Groups_Invite_Template $this Instance of the current Invites template.
     5421             */
     5422            do_action( 'loop_start', $this );
    53865423        }
    53875424    }
Note: See TracChangeset for help on using the changeset viewer.