Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/11/2016 01:53:40 PM (10 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.

File:
1 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    }
Note: See TracChangeset for help on using the changeset viewer.