Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2013 02:01:12 AM (7 years ago)
Author:
johnjamesjacoby
Message:

Theme Compatibility:

  • Intro duce bp_is_current_component_core() function, to determine if the current component is an active core component.
  • Use above function in plugins.php, to help determine whether or not to display the options navigation.
  • Update the root level single-member templates to use switch statements, per the settings components convention.
  • Fixes #4772.
File:
1 edited

Legend:

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

    r6284 r6783  
    2626<div class="profile" role="main">
    2727
    28     <?php
    29         // Profile Edit
    30         if ( bp_is_current_action( 'edit' ) )
    31             bp_get_template_part( 'members/single/profile/edit' );
     28<?php switch ( bp_current_action() ) :
    3229
    33         // Change Avatar
    34         elseif ( bp_is_current_action( 'change-avatar' ) )
    35             bp_get_template_part( 'members/single/profile/change-avatar' );
     30    // Edit
     31    case 'edit'   :
     32        bp_get_template_part( 'members/single/profile/edit' );
     33        break;
     34
     35    // Change Avatar
     36    case 'change-avatar' :
     37        bp_get_template_part( 'members/single/profile/change-avatar' );
     38        break;
     39
     40    // Compose
     41    case 'public' :
    3642
    3743        // Display XProfile
    38         elseif ( bp_is_active( 'xprofile' ) )
     44        if ( bp_is_active( 'xprofile' ) )
    3945            bp_get_template_part( 'members/single/profile/profile-loop' );
    4046
    4147        // Display WordPress profile (fallback)
    4248        else
    43             bp_get_template_part( 'members/single/profile/profile-wp' )
    44     ?>
     49            bp_get_template_part( 'members/single/profile/profile-wp' );
    4550
     51        break;
     52
     53    // Any other
     54    default :
     55        bp_get_template_part( 'members/single/plugins' );
     56        break;
     57endswitch; ?>
    4658</div><!-- .profile -->
    4759
Note: See TracChangeset for help on using the changeset viewer.