[buddypress-trac] [BuddyPress] #3484: Inconsistency in action hook position in default theme files

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Aug 17 13:55:07 UTC 2011

#3484: Inconsistency in action hook position in default theme files
 Reporter:  Jonnyauk     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Theme        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  2nd-opinion  |

Comment (by Jonnyauk):

 Agreed - it is important to check to see what the knock-on effects of this
 are for plugins and themes.

 I've just had a look BP1.2.9 bp-themes/bp-default/members/index.php (as
 shown in example 2 above) and see that it has the following structure with
 the 'before' hook inside the 'content' and 'padder' divs.

 = BP1.2.9 bp-themes/bp-default/members/index.php
 3 <div id="content">
 4   <div class="padder">
 6     <form action="" method="post" id="members-directory-form" class
 8     <h3><?php _e( 'Members Directory', 'buddypress' ) ?></h3>
 10    <?php do_action( 'bp_before_directory_members_content' ) ?>
 51   <?php do_action( 'bp_after_directory_members_content' ) ?>
 53   </form><!-- #members-directory-form -->
 55   </div><!-- .padder -->
 56 </div><!-- #content -->

 The thing to note here is that the hook is also after the <h3> header (it
 is before this in BP1.5-beta2). I have no beef with the header, in-fact
 logic would suggest that this is probably correct and the action hook
 should come after the header right before the actual content starts?

 Without checking deeper, it looks like there's a gremlin crept in there in
 BP1.5-beta2 default theme files (I checked out the trunk version before
 posting ticket). I've only compared these two files - but it certainly
 looks like the relevant 'before' and 'after' action hooks
 (bp_before_directory_members_content in this example) were originally
 inside the main 'content' and 'padder' divs in BP1.2.9

 I'll be happy to offer to go through the default theme files and create
 patches for them if it is decided that this is appropriate action, it's
 the least I can do!

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3484#comment:2>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list