Skip to:
Content

BuddyPress.org

Changeset 11083


Ignore:
Timestamp:
09/11/2016 01:53:40 PM (7 years ago)
Author:
djpaul
Message:

Groups: rename loop_start and loop_end actions.

This gives the Group Invitations and Group Members loops unique names for the actions called at the start and end of those templating loops. These are analagous to WordPress' Post templating loop with loop_start and loop_end, which is where the action names were likely copied from originally.

This has caused compatibility problems with plugins that hook to these actions that rightly expect the type of the first passed argument to be of WP_Query.

Fixes #7247

Props herbovec for reporting the issue.

Location:
trunk/src/bp-groups/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-group-members-template.php

    r10520 r11083  
    240240             * @since 1.0.0
    241241             * @since 2.3.0 `$this` parameter added.
     242             * @since 2.7.0 Action renamed from `loop_end`.
    242243             *
    243244             * @param BP_Groups_Group_Members_Template $this Instance of the current Members template.
    244245             */
    245             do_action( 'loop_end', $this );
     246            do_action( 'group_members_loop_end', $this );
    246247
    247248            // Do some cleaning up after the loop.
     
    270271             * @since 1.0.0
    271272             * @since 2.3.0 `$this` parameter added.
     273             * @since 2.7.0 Action renamed from `loop_start`.
    272274             *
    273275             * @param BP_Groups_Group_Members_Template $this Instance of the current Members template.
    274276             */
    275             do_action( 'loop_start', $this );
     277            do_action( 'group_members_loop_start', $this );
    276278        }
    277279    }
  • trunk/src/bp-groups/classes/class-bp-groups-invite-template.php

    r10520 r11083  
    198198             * @since 1.1.0
    199199             * @since 2.3.0 `$this` parameter added.
     200             * @since 2.7.0 Action renamed from `loop_start`.
    200201             *
    201202             * @param BP_Groups_Invite_Template $this Instance of the current Invites template.
    202203             */
    203             do_action( 'loop_end', $this );
     204            do_action( 'group_invitation_loop_end', $this );
    204205
    205206            // Do some cleaning up after the loop
     
    262263             * @since 1.1.0
    263264             * @since 2.3.0 `$this` parameter added.
     265             * @since 2.7.0 Action renamed from `loop_start`.
    264266             *
    265267             * @param BP_Groups_Invite_Template $this Instance of the current Invites template.
    266268             */
    267             do_action( 'loop_start', $this );
     269            do_action( 'group_invitation_loop_start', $this );
    268270        }
    269271    }
Note: See TracChangeset for help on using the changeset viewer.