Skip to:
Content

BuddyPress.org

Changeset 7211


Ignore:
Timestamp:
06/13/2013 01:14:54 AM (6 years ago)
Author:
boonebgorges
Message:

Show member Profile subnav for all users, not just when viewing one's own profile

The logic for hiding others' Profile subnavs comes from the fact that, as a
rule, the only subnav item available when viewing another person's profile is
View/Public. But this causes problems when plugins or themes try to add
additional tabs to user Profiles.

By removing the bp_is_my_profile() check hardcoded in the template, we rely on
the bp_core_new_subnav_item() logic in setup_nav() to do the necessary access
control (which it was already doing).

Fixes #5039

Props r-a-y

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-templates/bp-legacy/buddypress/members/single/profile.php

    r6783 r7211  
    1010?>
    1111
    12 <?php if ( bp_is_my_profile() ) : ?>
    13 
    14     <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
    15         <ul>
    16 
    17             <?php bp_get_options_nav(); ?>
    18 
    19         </ul>
    20     </div><!-- .item-list-tabs -->
    21 
    22 <?php endif; ?>
     12<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     13    <ul>
     14        <?php bp_get_options_nav(); ?>
     15    </ul>
     16</div><!-- .item-list-tabs -->
    2317
    2418<?php do_action( 'bp_before_profile_content' ); ?>
  • trunk/bp-themes/bp-default/members/single/profile.php

    r4321 r7211  
    1010?>
    1111
    12 <?php if ( bp_is_my_profile() ) : ?>
    13 
    14     <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
    15         <ul>
    16 
    17             <?php bp_get_options_nav(); ?>
    18 
    19         </ul>
    20     </div><!-- .item-list-tabs -->
    21 
    22 <?php endif; ?>
     12<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     13    <ul>
     14        <?php bp_get_options_nav(); ?>
     15    </ul>
     16</div><!-- .item-list-tabs -->
    2317
    2418<?php do_action( 'bp_before_profile_content' ); ?>
Note: See TracChangeset for help on using the changeset viewer.