[buddypress-trac] [BuddyPress] #5166: Doubling the same actions

buddypress-trac noreply at wordpress.org
Mon Sep 9 22:05:24 UTC 2013

#5166: Doubling the same actions
 Reporter:  slaFFik       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Groups        |    Version:  1.8.1
 Severity:  major         |   Keywords:
 In one of my plugins I display additional navigation using
 `bp_before_group_body` hook.
 Now lets see how BuddyPress loads pages in theme compatibility mode:
 1) You open the group page, `/groups/single/home.php` is loaded (where
 header and groups inside data logic). This file has this line on line ~27:

 <?php do_action( 'bp_before_group_body' ); ?>

 2) In case none of if's below it satisfies the current request it loads
 `/groups/single/plugins.php`. And inside that file we '''again''' have the
 same hook.

 <?php do_action( 'bp_before_group_body' ); ?>

 The same for

 <?php do_action( 'bp_after_group_body' ); ?>

 This creates possible content duplication. Like in my plugin's case.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5166>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list