[buddypress-trac] [BuddyPress] #3854: bp_is_groups_component conditional does not work on 3rd Party Group Component Pages

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Dec 14 14:27:30 UTC 2011


#3854: bp_is_groups_component conditional does not work on 3rd Party Group
Component Pages
--------------------------+-----------------------------
 Reporter:  bowromir      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Groups        |    Version:  1.5.2
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 The bp_is_groups_component() conditional can be used to check if you're
 currently on a group page or inside the groups directory. This works fine,
 unless you are on a Group page added by a 3rd party plugin (for exampel
 BuddyPress Docs). When you visit a page the conditional is "false" while
 it should be true. two screenshots that illustrate this. Please check the
 sidebar "widget"to see what happens.

 Core Group Page: http://cl.ly/3o402G2X1u2Y1Y2U0D26
 3rd Party Group Page: http://cl.ly/0l3F1x3f2Y3q1m1e3n0k

 Small part of the code used for the Group Sidebar

 {{{
 elseif ( function_exists('bp_is_page') && bp_is_groups_component() ) {
                 if ( is_active_sidebar( 'groups-sidebar' ) ) {
                     dynamic_sidebar( 'groups-sidebar');
                                 } else { ?>
                                 <div class="widget"><h4>BP Group
 Sidebar.</h4>
                                 <a href="<?php echo home_url( '/'  );
 ?>wp-admin/widgets.php" title="Add Widgets">Add Widgets</a></div><?php
                                 }
 }}}

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


More information about the buddypress-trac mailing list