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/messages.php

    r6284 r6783  
    2626
    2727<?php
     28switch ( bp_current_action() ) :
    2829
    29     if ( bp_is_current_action( 'compose' ) ) :
    30         bp_get_template_part( 'members/single/messages/compose' );
    31 
    32     elseif ( bp_is_current_action( 'view' ) ) :
    33         bp_get_template_part( 'members/single/messages/single' );
    34 
    35     else :
     30    // Inbox/Sentbox
     31    case 'inbox'   :
     32    case 'sentbox' :
    3633        do_action( 'bp_before_member_messages_content' ); ?>
    3734
    38     <div class="messages" role="main">
     35        <div class="messages" role="main">
     36            <?php bp_get_template_part( 'members/single/messages/messages-loop' ); ?>
     37        </div><!-- .messages -->
    3938
    40         <?php
    41             if ( bp_is_current_action( 'notices' ) )
    42                 bp_get_template_part( 'members/single/messages/notices-loop' );
    43             else
    44                 bp_get_template_part( 'members/single/messages/messages-loop' );
    45         ?>
     39        <?php do_action( 'bp_after_member_messages_content' );
     40        break;
    4641
    47     </div><!-- .messages -->
     42    // Single Message View
     43    case 'view' :
     44        bp_get_template_part( 'members/single/messages/single' );
     45        break;
    4846
    49     <?php do_action( 'bp_after_member_messages_content' ); ?>
     47    // Compose
     48    case 'compose' :
     49        bp_get_template_part( 'members/single/messages/compose' );
     50        break;
    5051
    51 <?php endif; ?>
     52    // Sitewide Notices
     53    case 'notices' :
     54        do_action( 'bp_before_member_messages_content' ); ?>
     55
     56        <div class="messages" role="main">
     57            <?php bp_get_template_part( 'members/single/messages/notices-loop' );; ?>
     58        </div><!-- .messages -->
     59
     60        <?php do_action( 'bp_after_member_messages_content' );
     61        break;
     62
     63    // Any other
     64    default :
     65        bp_get_template_part( 'members/single/plugins' );
     66        break;
     67endswitch;
Note: See TracChangeset for help on using the changeset viewer.