Skip to:
Content

bbPress.org

Changeset 5689


Ignore:
Timestamp:
04/19/2015 04:45:02 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Templates: Micro-optimizations:

  • Remove trailing ?> tag in some template parts
  • Remove preceding ?> <?php in some template parts, after phpdoc header
  • Remove whitespace where superfluous
  • Reduce number of indentations in some template parts
Location:
trunk/src/templates/default/bbpress
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/templates/default/bbpress/content-single-topic-lead.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php do_action( 'bbp_template_before_lead_topic' ); ?>
     10do_action( 'bbp_template_before_lead_topic' ); ?>
    1311
    1412<ul id="bbp-topic-<?php bbp_topic_id(); ?>-lead" class="bbp-lead-topic">
     
    9694</ul><!-- #bbp-topic-<?php bbp_topic_id(); ?>-lead -->
    9795
    98 <?php do_action( 'bbp_template_after_lead_topic' ); ?>
     96<?php do_action( 'bbp_template_after_lead_topic' );
  • trunk/src/templates/default/bbpress/content-single-user.php

    r4836 r5689  
    1515
    1616    <div id="bbp-user-wrapper">
     17
    1718        <?php bbp_get_template_part( 'user', 'details' ); ?>
    1819
    1920        <div id="bbp-user-body">
    20             <?php if ( bbp_is_favorites()                 ) bbp_get_template_part( 'user', 'favorites'       ); ?>
    21             <?php if ( bbp_is_subscriptions()             ) bbp_get_template_part( 'user', 'subscriptions'   ); ?>
    22             <?php if ( bbp_is_single_user_topics()        ) bbp_get_template_part( 'user', 'topics-created'  ); ?>
    23             <?php if ( bbp_is_single_user_replies()       ) bbp_get_template_part( 'user', 'replies-created' ); ?>
    24             <?php if ( bbp_is_single_user_edit()          ) bbp_get_template_part( 'form', 'user-edit'       ); ?>
    25             <?php if ( bbp_is_single_user_profile()       ) bbp_get_template_part( 'user', 'profile'         ); ?>
     21            <?php if ( bbp_is_favorites()           ) bbp_get_template_part( 'user', 'favorites'       ); ?>
     22            <?php if ( bbp_is_subscriptions()       ) bbp_get_template_part( 'user', 'subscriptions'   ); ?>
     23            <?php if ( bbp_is_single_user_topics()  ) bbp_get_template_part( 'user', 'topics-created'  ); ?>
     24            <?php if ( bbp_is_single_user_replies() ) bbp_get_template_part( 'user', 'replies-created' ); ?>
     25            <?php if ( bbp_is_single_user_edit()    ) bbp_get_template_part( 'form', 'user-edit'       ); ?>
     26            <?php if ( bbp_is_single_user_profile() ) bbp_get_template_part( 'user', 'profile'         ); ?>
    2627        </div>
    2728    </div>
  • trunk/src/templates/default/bbpress/form-anonymous.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php if ( bbp_current_user_can_access_anonymous_user_form() ) : ?>
     10if ( bbp_current_user_can_access_anonymous_user_form() ) : ?>
    1311
    1412    <?php do_action( 'bbp_theme_before_anonymous_form' ); ?>
     
    4038    <?php do_action( 'bbp_theme_after_anonymous_form' ); ?>
    4139
    42 <?php endif; ?>
     40<?php endif;
  • trunk/src/templates/default/bbpress/form-forum.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php if ( bbp_is_forum_edit() ) : ?>
     10if ( bbp_is_forum_edit() ) : ?>
    1311
    1412<div id="bbpress-forums">
  • trunk/src/templates/default/bbpress/form-reply.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php if ( bbp_is_reply_edit() ) : ?>
     10if ( bbp_is_reply_edit() ) : ?>
    1311
    1412<div id="bbpress-forums">
  • trunk/src/templates/default/bbpress/form-topic-tag.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php if ( current_user_can( 'edit_topic_tags' ) ) : ?>
     10if ( current_user_can( 'edit_topic_tags' ) ) : ?>
    1311
    1412    <div id="edit-topic-tag-<?php bbp_topic_tag_id(); ?>" class="bbp-topic-tag-form">
  • trunk/src/templates/default/bbpress/form-topic.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php if ( !bbp_is_single_forum() ) : ?>
     10if ( ! bbp_is_single_forum() ) : ?>
    1311
    1412<div id="bbpress-forums">
  • trunk/src/templates/default/bbpress/form-user-edit.php

    r5688 r5689  
    172172        </div>
    173173    </fieldset>
    174 
    175174</form>
  • trunk/src/templates/default/bbpress/loop-forums.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php do_action( 'bbp_template_before_forums_loop' ); ?>
     10do_action( 'bbp_template_before_forums_loop' ); ?>
    1311
    1412<ul id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums">
     
    4846</ul><!-- .forums-directory -->
    4947
    50 <?php do_action( 'bbp_template_after_forums_loop' ); ?>
     48<?php do_action( 'bbp_template_after_forums_loop' );
  • trunk/src/templates/default/bbpress/loop-replies.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php do_action( 'bbp_template_before_replies_loop' ); ?>
     10do_action( 'bbp_template_before_replies_loop' ); ?>
    1311
    1412<ul id="topic-<?php bbp_topic_id(); ?>-replies" class="forums bbp-replies">
    1513
    1614    <li class="bbp-header">
    17 
    1815        <div class="bbp-reply-author"><?php esc_html_e( 'Author',  'bbpress' ); ?></div><!-- .bbp-reply-author -->
    19 
    20         <div class="bbp-reply-content">
    21 
    22             <?php if ( ! bbp_show_lead_topic() ) : ?>
    23 
    24                 <?php esc_html_e( 'Posts', 'bbpress' ); ?>
    25 
    26             <?php else : ?>
    27 
    28                 <?php esc_html_e( 'Replies', 'bbpress' ); ?>
    29 
    30             <?php endif; ?>
    31 
    32         </div><!-- .bbp-reply-content -->
    33 
     16        <div class="bbp-reply-content"><?php bbp_show_lead_topic()
     17            ? esc_html_e( 'Replies', 'bbpress' )
     18            : esc_html_e( 'Posts',   'bbpress' );
     19        ?></div><!-- .bbp-reply-content -->
    3420    </li><!-- .bbp-header -->
    3521
     
    5339
    5440    <li class="bbp-footer">
    55 
    5641        <div class="bbp-reply-author"><?php esc_html_e( 'Author',  'bbpress' ); ?></div>
    57 
    58         <div class="bbp-reply-content">
    59 
    60             <?php if ( ! bbp_show_lead_topic() ) : ?>
    61 
    62                 <?php esc_html_e( 'Posts', 'bbpress' ); ?>
    63 
    64             <?php else : ?>
    65 
    66                 <?php esc_html_e( 'Replies', 'bbpress' ); ?>
    67 
    68             <?php endif; ?>
    69 
    70         </div><!-- .bbp-reply-content -->
    71 
     42        <div class="bbp-reply-content"><?php bbp_show_lead_topic()
     43            ? esc_html_e( 'Replies', 'bbpress' )
     44            : esc_html_e( 'Posts',   'bbpress' );
     45        ?></div><!-- .bbp-reply-content -->
    7246    </li><!-- .bbp-footer -->
    73 
    7447</ul><!-- #topic-<?php bbp_topic_id(); ?>-replies -->
    7548
    76 <?php do_action( 'bbp_template_after_replies_loop' ); ?>
     49<?php do_action( 'bbp_template_after_replies_loop' );
  • trunk/src/templates/default/bbpress/loop-search-forum.php

    r5688 r5689  
    1111
    1212<div class="bbp-forum-header">
    13 
    1413    <div class="bbp-meta">
    15 
    1614        <span class="bbp-forum-post-date"><?php printf( esc_html__( 'Last updated %s', 'bbpress' ), bbp_get_forum_last_active_time() ); ?></span>
    17 
    1815        <a href="<?php bbp_forum_permalink(); ?>" class="bbp-forum-permalink">#<?php bbp_forum_id(); ?></a>
    19 
    2016    </div><!-- .bbp-meta -->
    2117
     
    2925
    3026    </div><!-- .bbp-forum-title -->
    31 
    3227</div><!-- .bbp-forum-header -->
    3328
    3429<div id="post-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>
    35 
    3630    <div class="bbp-forum-content">
    3731
     
    4337
    4438    </div><!-- .bbp-forum-content -->
    45 
    4639</div><!-- #post-<?php bbp_forum_id(); ?> -->
  • trunk/src/templates/default/bbpress/loop-search-reply.php

    r5688 r5689  
    1111
    1212<div class="bbp-reply-header">
    13 
    1413    <div class="bbp-meta">
    15 
    1614        <span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
    17 
    1815        <a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
    19 
    2016    </div><!-- .bbp-meta -->
    2117
    2218    <div class="bbp-reply-title">
    23 
    2419        <h3><?php esc_html_e( 'In reply to: ', 'bbpress' ); ?>
    2520        <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a></h3>
    26 
    2721    </div><!-- .bbp-reply-title -->
    28 
    2922</div><!-- .bbp-reply-header -->
    3023
    3124<div id="post-<?php bbp_reply_id(); ?>" <?php bbp_reply_class(); ?>>
    32 
    3325    <div class="bbp-reply-author">
    3426
     
    6052
    6153    </div><!-- .bbp-reply-content -->
    62 
    6354</div><!-- #post-<?php bbp_reply_id(); ?> -->
    6455
  • trunk/src/templates/default/bbpress/loop-search-topic.php

    r5688 r5689  
    1111
    1212<div class="bbp-topic-header">
    13 
    1413    <div class="bbp-meta">
    15 
    1614        <span class="bbp-topic-post-date"><?php bbp_topic_post_date( bbp_get_topic_id() ); ?></span>
    17 
    1815        <a href="<?php bbp_topic_permalink(); ?>" class="bbp-topic-permalink">#<?php bbp_topic_id(); ?></a>
    19 
    2016    </div><!-- .bbp-meta -->
    2117
     
    5046
    5147<div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
    52 
    5348    <div class="bbp-topic-author">
    5449
     
    8075
    8176    </div><!-- .bbp-topic-content -->
    82 
    8377</div><!-- #post-<?php bbp_topic_id(); ?> -->
  • trunk/src/templates/default/bbpress/loop-search.php

    r5688 r5689  
    88*/
    99
    10 ?>
    11 
    12 <?php do_action( 'bbp_template_before_search_results_loop' ); ?>
     10do_action( 'bbp_template_before_search_results_loop' ); ?>
    1311
    1412<ul id="bbp-search-results" class="forums bbp-search-results">
     
    5048</ul><!-- #bbp-search-results -->
    5149
    52 <?php do_action( 'bbp_template_after_search_results_loop' ); ?>
     50<?php do_action( 'bbp_template_after_search_results_loop' );
  • trunk/src/templates/default/bbpress/loop-single-forum.php

    r5156 r5689  
    1111
    1212<ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>
    13 
    1413    <li class="bbp-forum-info">
    1514
     
    7271        </p>
    7372    </li>
    74 
    7573</ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
  • trunk/src/templates/default/bbpress/loop-single-reply.php

    r5688 r5689  
    1111
    1212<div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
    13 
    1413    <div class="bbp-meta">
    15 
    1614        <span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
    1715
     
    3432
    3533    </div><!-- .bbp-meta -->
    36 
    3734</div><!-- #post-<?php bbp_reply_id(); ?> -->
    3835
    3936<div <?php bbp_reply_class(); ?>>
    40 
    4137    <div class="bbp-reply-author">
    4238
     
    6864
    6965    </div><!-- .bbp-reply-content -->
    70 
    7166</div><!-- .reply -->
  • trunk/src/templates/default/bbpress/loop-single-topic.php

    r5688 r5689  
    1111
    1212<ul id="bbp-topic-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
    13 
    1413    <li class="bbp-topic-title">
    1514
     
    102101        </p>
    103102    </li>
    104 
    105103</ul><!-- #bbp-topic-<?php bbp_topic_id(); ?> -->
  • trunk/src/templates/default/bbpress/loop-topics.php

    r5688 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php do_action( 'bbp_template_before_topics_loop' ); ?>
     10do_action( 'bbp_template_before_topics_loop' ); ?>
    1311
    1412<ul id="bbp-forum-<?php bbp_forum_id(); ?>" class="bbp-topics">
    15 
    1613    <li class="bbp-header">
    17 
    1814        <ul class="forum-titles">
    1915            <li class="bbp-topic-title"><?php esc_html_e( 'Topic', 'bbpress' ); ?></li>
     
    2521            <li class="bbp-topic-freshness"><?php esc_html_e( 'Freshness', 'bbpress' ); ?></li>
    2622        </ul>
    27 
    2823    </li>
    2924
     
    3934
    4035    <li class="bbp-footer">
    41 
    4236        <div class="tr">
    4337            <p>
     
    4539            </p>
    4640        </div><!-- .tr -->
    47 
    4841    </li>
    49 
    5042</ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
    5143
    52 <?php do_action( 'bbp_template_after_topics_loop' ); ?>
     44<?php do_action( 'bbp_template_after_topics_loop' );
  • trunk/src/templates/default/bbpress/pagination-replies.php

    r4733 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php do_action( 'bbp_template_before_pagination_loop' ); ?>
     10do_action( 'bbp_template_before_pagination_loop' ); ?>
    1311
    1412<div class="bbp-pagination">
    15     <div class="bbp-pagination-count">
    16 
    17         <?php bbp_topic_pagination_count(); ?>
    18 
    19     </div>
    20 
    21     <div class="bbp-pagination-links">
    22 
    23         <?php bbp_topic_pagination_links(); ?>
    24 
    25     </div>
     13    <div class="bbp-pagination-count"><?php bbp_topic_pagination_count(); ?></div>
     14    <div class="bbp-pagination-links"><?php bbp_topic_pagination_links(); ?></div>
    2615</div>
    2716
    28 <?php do_action( 'bbp_template_after_pagination_loop' ); ?>
     17<?php do_action( 'bbp_template_after_pagination_loop' );
  • trunk/src/templates/default/bbpress/pagination-search.php

    r4579 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php do_action( 'bbp_template_before_pagination_loop' ); ?>
     10do_action( 'bbp_template_before_pagination_loop' ); ?>
    1311
    1412<div class="bbp-pagination">
    15     <div class="bbp-pagination-count">
    16 
    17         <?php bbp_search_pagination_count(); ?>
    18 
    19     </div>
    20 
    21     <div class="bbp-pagination-links">
    22 
    23         <?php bbp_search_pagination_links(); ?>
    24 
    25     </div>
     13    <div class="bbp-pagination-count"><?php bbp_search_pagination_count(); ?></div>
     14    <div class="bbp-pagination-links"><?php bbp_search_pagination_links(); ?></div>
    2615</div>
    2716
    28 <?php do_action( 'bbp_template_after_pagination_loop' ); ?>
     17<?php do_action( 'bbp_template_after_pagination_loop' );
  • trunk/src/templates/default/bbpress/pagination-topics.php

    r4733 r5689  
    88 */
    99
    10 ?>
    11 
    12 <?php do_action( 'bbp_template_before_pagination_loop' ); ?>
     10do_action( 'bbp_template_before_pagination_loop' ); ?>
    1311
    1412<div class="bbp-pagination">
    15     <div class="bbp-pagination-count">
    16 
    17         <?php bbp_forum_pagination_count(); ?>
    18 
    19     </div>
    20 
    21     <div class="bbp-pagination-links">
    22 
    23         <?php bbp_forum_pagination_links(); ?>
    24 
    25     </div>
     13    <div class="bbp-pagination-count"><?php bbp_forum_pagination_count(); ?></div>
     14    <div class="bbp-pagination-links"><?php bbp_forum_pagination_links(); ?></div>
    2615</div>
    2716
    28 <?php do_action( 'bbp_template_after_pagination_loop' ); ?>
     17<?php do_action( 'bbp_template_after_pagination_loop' );
  • trunk/src/templates/default/bbpress/user-details.php

    r5688 r5689  
    88 */
    99
    10 ?>
     10do_action( 'bbp_template_before_user_details' ); ?>
    1111
    12     <?php do_action( 'bbp_template_before_user_details' ); ?>
     12<div id="bbp-single-user-details">
     13    <div id="bbp-user-avatar">
     14        <span class='vcard'>
     15            <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?>" rel="me">
     16                <?php echo get_avatar( bbp_get_displayed_user_field( 'user_email', 'raw' ), apply_filters( 'bbp_single_user_details_avatar_size', 150 ) ); ?>
     17            </a>
     18        </span>
     19    </div><!-- #author-avatar -->
    1320
    14     <div id="bbp-single-user-details">
    15         <div id="bbp-user-avatar">
     21    <div id="bbp-user-navigation">
     22        <ul>
     23            <li class="<?php if ( bbp_is_single_user_profile() ) :?>current<?php endif; ?>">
     24                <span class="vcard bbp-user-profile-link">
     25                    <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php printf( esc_attr__( "%s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>" rel="me"><?php esc_html_e( 'Profile', 'bbpress' ); ?></a>
     26                </span>
     27            </li>
    1628
    17             <span class='vcard'>
    18                 <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?>" rel="me">
    19                     <?php echo get_avatar( bbp_get_displayed_user_field( 'user_email', 'raw' ), apply_filters( 'bbp_single_user_details_avatar_size', 150 ) ); ?>
    20                 </a>
    21             </span>
     29            <li class="<?php if ( bbp_is_single_user_topics() ) :?>current<?php endif; ?>">
     30                <span class='bbp-user-topics-created-link'>
     31                    <a href="<?php bbp_user_topics_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Topics Started", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Topics Started', 'bbpress' ); ?></a>
     32                </span>
     33            </li>
    2234
    23         </div><!-- #author-avatar -->
     35            <li class="<?php if ( bbp_is_single_user_replies() ) :?>current<?php endif; ?>">
     36                <span class='bbp-user-replies-created-link'>
     37                    <a href="<?php bbp_user_replies_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Replies Created", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Replies Created', 'bbpress' ); ?></a>
     38                </span>
     39            </li>
    2440
    25         <div id="bbp-user-navigation">
    26             <ul>
    27                 <li class="<?php if ( bbp_is_single_user_profile() ) :?>current<?php endif; ?>">
    28                     <span class="vcard bbp-user-profile-link">
    29                         <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php printf( esc_attr__( "%s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>" rel="me"><?php esc_html_e( 'Profile', 'bbpress' ); ?></a>
     41            <?php if ( bbp_is_favorites_active() ) : ?>
     42                <li class="<?php if ( bbp_is_favorites() ) :?>current<?php endif; ?>">
     43                    <span class="bbp-user-favorites-link">
     44                        <a href="<?php bbp_favorites_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Favorites", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Favorites', 'bbpress' ); ?></a>
    3045                    </span>
    3146                </li>
     47            <?php endif; ?>
    3248
    33                 <li class="<?php if ( bbp_is_single_user_topics() ) :?>current<?php endif; ?>">
    34                     <span class='bbp-user-topics-created-link'>
    35                         <a href="<?php bbp_user_topics_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Topics Started", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Topics Started', 'bbpress' ); ?></a>
    36                     </span>
    37                 </li>
     49            <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
    3850
    39                 <li class="<?php if ( bbp_is_single_user_replies() ) :?>current<?php endif; ?>">
    40                     <span class='bbp-user-replies-created-link'>
    41                         <a href="<?php bbp_user_replies_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Replies Created", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Replies Created', 'bbpress' ); ?></a>
    42                     </span>
    43                 </li>
    44 
    45                 <?php if ( bbp_is_favorites_active() ) : ?>
    46                     <li class="<?php if ( bbp_is_favorites() ) :?>current<?php endif; ?>">
    47                         <span class="bbp-user-favorites-link">
    48                             <a href="<?php bbp_favorites_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Favorites", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Favorites', 'bbpress' ); ?></a>
     51                <?php if ( bbp_is_subscriptions_active() ) : ?>
     52                    <li class="<?php if ( bbp_is_subscriptions() ) :?>current<?php endif; ?>">
     53                        <span class="bbp-user-subscriptions-link">
     54                            <a href="<?php bbp_subscriptions_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Subscriptions", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Subscriptions', 'bbpress' ); ?></a>
    4955                        </span>
    5056                    </li>
    5157                <?php endif; ?>
    5258
    53                 <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
     59                <li class="<?php if ( bbp_is_single_user_edit() ) :?>current<?php endif; ?>">
     60                    <span class="bbp-user-edit-link">
     61                        <a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( esc_attr__( "Edit %s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Edit', 'bbpress' ); ?></a>
     62                    </span>
     63                </li>
    5464
    55                     <?php if ( bbp_is_subscriptions_active() ) : ?>
    56                         <li class="<?php if ( bbp_is_subscriptions() ) :?>current<?php endif; ?>">
    57                             <span class="bbp-user-subscriptions-link">
    58                                 <a href="<?php bbp_subscriptions_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Subscriptions", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Subscriptions', 'bbpress' ); ?></a>
    59                             </span>
    60                         </li>
    61                     <?php endif; ?>
     65            <?php endif; ?>
    6266
    63                     <li class="<?php if ( bbp_is_single_user_edit() ) :?>current<?php endif; ?>">
    64                         <span class="bbp-user-edit-link">
    65                             <a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( esc_attr__( "Edit %s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Edit', 'bbpress' ); ?></a>
    66                         </span>
    67                     </li>
     67        </ul>
     68    </div><!-- #bbp-user-navigation -->
     69</div><!-- #bbp-single-user-details -->
    6870
    69                 <?php endif; ?>
    70 
    71             </ul>
    72         </div><!-- #bbp-user-navigation -->
    73     </div><!-- #bbp-single-user-details -->
    74 
    75     <?php do_action( 'bbp_template_after_user_details' ); ?>
     71<?php do_action( 'bbp_template_after_user_details' );
  • trunk/src/templates/default/bbpress/user-favorites.php

    r5688 r5689  
    88 */
    99
    10 ?>
     10do_action( 'bbp_template_before_user_favorites' ); ?>
    1111
    12     <?php do_action( 'bbp_template_before_user_favorites' ); ?>
     12<div id="bbp-user-favorites" class="bbp-user-favorites">
     13    <h2 class="entry-title"><?php esc_html_e( 'Favorite Forum Topics', 'bbpress' ); ?></h2>
     14    <div class="bbp-user-section">
    1315
    14     <div id="bbp-user-favorites" class="bbp-user-favorites">
    15         <h2 class="entry-title"><?php esc_html_e( 'Favorite Forum Topics', 'bbpress' ); ?></h2>
    16         <div class="bbp-user-section">
     16        <?php if ( bbp_get_user_favorites() ) : ?>
    1717
    18             <?php if ( bbp_get_user_favorites() ) : ?>
     18            <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    1919
    20                 <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
     20            <?php bbp_get_template_part( 'loop',      'topics' ); ?>
    2121
    22                 <?php bbp_get_template_part( 'loop',      'topics' ); ?>
     22            <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    2323
    24                 <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
     24        <?php else : ?>
    2525
    26             <?php else : ?>
     26            <p><?php bbp_is_user_home()
     27                ? esc_html_e( 'You currently have no favorite topics.', 'bbpress' )
     28                : esc_html_e( 'This user has no favorite topics.',      'bbpress' );
     29            ?></p>
    2730
    28                 <p><?php bbp_is_user_home()
    29                     ? esc_html_e( 'You currently have no favorite topics.', 'bbpress' )
    30                     : esc_html_e( 'This user has no favorite topics.',      'bbpress' );
    31                 ?></p>
     31        <?php endif; ?>
    3232
    33             <?php endif; ?>
     33    </div>
     34</div><!-- #bbp-user-favorites -->
    3435
    35         </div>
    36     </div><!-- #bbp-user-favorites -->
    37 
    38     <?php do_action( 'bbp_template_after_user_favorites' ); ?>
     36<?php do_action( 'bbp_template_after_user_favorites' );
  • trunk/src/templates/default/bbpress/user-profile.php

    r5688 r5689  
    88 */
    99
    10 ?>
     10do_action( 'bbp_template_before_user_profile' ); ?>
    1111
    12     <?php do_action( 'bbp_template_before_user_profile' ); ?>
     12<div id="bbp-user-profile" class="bbp-user-profile">
     13    <h2 class="entry-title"><?php esc_html_e( 'Profile', 'bbpress' ); ?></h2>
     14    <div class="bbp-user-section">
    1315
    14     <div id="bbp-user-profile" class="bbp-user-profile">
    15         <h2 class="entry-title"><?php esc_html_e( 'Profile', 'bbpress' ); ?></h2>
    16         <div class="bbp-user-section">
     16        <?php if ( bbp_get_displayed_user_field( 'description' ) ) : ?>
    1717
    18             <?php if ( bbp_get_displayed_user_field( 'description' ) ) : ?>
     18            <p class="bbp-user-description"><?php bbp_displayed_user_field( 'description' ); ?></p>
    1919
    20                 <p class="bbp-user-description"><?php bbp_displayed_user_field( 'description' ); ?></p>
     20        <?php endif; ?>
    2121
    22             <?php endif; ?>
     22        <p class="bbp-user-forum-role"><?php  printf( esc_html__( 'Forum Role: %s',      'bbpress' ), bbp_get_user_display_role()    ); ?></p>
     23        <p class="bbp-user-topic-count"><?php printf( esc_html__( 'Topics Started: %s',  'bbpress' ), bbp_get_user_topic_count_raw() ); ?></p>
     24        <p class="bbp-user-reply-count"><?php printf( esc_html__( 'Replies Created: %s', 'bbpress' ), bbp_get_user_reply_count_raw() ); ?></p>
     25    </div>
     26</div><!-- #bbp-author-topics-started -->
    2327
    24             <p class="bbp-user-forum-role"><?php  printf( esc_html__( 'Forum Role: %s',      'bbpress' ), bbp_get_user_display_role()    ); ?></p>
    25             <p class="bbp-user-topic-count"><?php printf( esc_html__( 'Topics Started: %s',  'bbpress' ), bbp_get_user_topic_count_raw() ); ?></p>
    26             <p class="bbp-user-reply-count"><?php printf( esc_html__( 'Replies Created: %s', 'bbpress' ), bbp_get_user_reply_count_raw() ); ?></p>
    27         </div>
    28     </div><!-- #bbp-author-topics-started -->
    29 
    30     <?php do_action( 'bbp_template_after_user_profile' ); ?>
     28<?php do_action( 'bbp_template_after_user_profile' );
  • trunk/src/templates/default/bbpress/user-replies-created.php

    r5688 r5689  
    88 */
    99
    10 ?>
     10do_action( 'bbp_template_before_user_replies' ); ?>
    1111
    12     <?php do_action( 'bbp_template_before_user_replies' ); ?>
     12<div id="bbp-user-replies-created" class="bbp-user-replies-created">
     13    <h2 class="entry-title"><?php esc_html_e( 'Forum Replies Created', 'bbpress' ); ?></h2>
     14    <div class="bbp-user-section">
    1315
    14     <div id="bbp-user-replies-created" class="bbp-user-replies-created">
    15         <h2 class="entry-title"><?php esc_html_e( 'Forum Replies Created', 'bbpress' ); ?></h2>
    16         <div class="bbp-user-section">
     16        <?php if ( bbp_get_user_replies_created() ) : ?>
    1717
    18             <?php if ( bbp_get_user_replies_created() ) : ?>
     18            <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    1919
    20                 <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
     20            <?php bbp_get_template_part( 'loop',      'replies' ); ?>
    2121
    22                 <?php bbp_get_template_part( 'loop',      'replies' ); ?>
     22            <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    2323
    24                 <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
     24        <?php else : ?>
    2525
    26             <?php else : ?>
     26            <p><?php bbp_is_user_home()
     27                ? esc_html_e( 'You have not replied to any topics.',      'bbpress' )
     28                : esc_html_e( 'This user has not replied to any topics.', 'bbpress' );
     29            ?></p>
    2730
    28                 <p><?php bbp_is_user_home()
    29                     ? esc_html_e( 'You have not replied to any topics.',      'bbpress' )
    30                     : esc_html_e( 'This user has not replied to any topics.', 'bbpress' );
    31                 ?></p>
     31        <?php endif; ?>
    3232
    33             <?php endif; ?>
     33    </div>
     34</div><!-- #bbp-user-replies-created -->
    3435
    35         </div>
    36     </div><!-- #bbp-user-replies-created -->
    37 
    38     <?php do_action( 'bbp_template_after_user_replies' ); ?>
     36<?php do_action( 'bbp_template_after_user_replies' );
  • trunk/src/templates/default/bbpress/user-subscriptions.php

    r5688 r5689  
    88 */
    99
    10 ?>
     10do_action( 'bbp_template_before_user_subscriptions' ); ?>
    1111
    12     <?php do_action( 'bbp_template_before_user_subscriptions' ); ?>
     12<?php if ( bbp_is_subscriptions_active() ) : ?>
    1313
    14     <?php if ( bbp_is_subscriptions_active() ) : ?>
     14    <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
    1515
    16         <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
     16        <div id="bbp-user-subscriptions" class="bbp-user-subscriptions">
     17            <h2 class="entry-title"><?php esc_html_e( 'Subscribed Forums', 'bbpress' ); ?></h2>
     18            <div class="bbp-user-section">
    1719
    18             <div id="bbp-user-subscriptions" class="bbp-user-subscriptions">
    19                 <h2 class="entry-title"><?php esc_html_e( 'Subscribed Forums', 'bbpress' ); ?></h2>
    20                 <div class="bbp-user-section">
     20                <?php if ( bbp_get_user_forum_subscriptions() ) : ?>
    2121
    22                     <?php if ( bbp_get_user_forum_subscriptions() ) : ?>
     22                    <?php bbp_get_template_part( 'loop', 'forums' ); ?>
    2323
    24                         <?php bbp_get_template_part( 'loop', 'forums' ); ?>
     24                <?php else : ?>
    2525
    26                     <?php else : ?>
     26                    <p><?php bbp_is_user_home()
     27                        ? esc_html_e( 'You are not currently subscribed to any forums.',      'bbpress' )
     28                        : esc_html_e( 'This user is not currently subscribed to any forums.', 'bbpress' );
     29                    ?></p>
    2730
    28                         <p><?php bbp_is_user_home()
    29                             ? esc_html_e( 'You are not currently subscribed to any forums.',      'bbpress' )
    30                             : esc_html_e( 'This user is not currently subscribed to any forums.', 'bbpress' );
    31                         ?></p>
     31                <?php endif; ?>
    3232
    33                     <?php endif; ?>
     33            </div>
    3434
    35                 </div>
     35            <h2 class="entry-title"><?php esc_html_e( 'Subscribed Topics', 'bbpress' ); ?></h2>
     36            <div class="bbp-user-section">
    3637
    37                 <h2 class="entry-title"><?php esc_html_e( 'Subscribed Topics', 'bbpress' ); ?></h2>
    38                 <div class="bbp-user-section">
     38                <?php if ( bbp_get_user_topic_subscriptions() ) : ?>
    3939
    40                     <?php if ( bbp_get_user_topic_subscriptions() ) : ?>
     40                    <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    4141
    42                         <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
     42                    <?php bbp_get_template_part( 'loop',      'topics' ); ?>
    4343
    44                         <?php bbp_get_template_part( 'loop',      'topics' ); ?>
     44                    <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    4545
    46                         <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
     46                <?php else : ?>
    4747
    48                     <?php else : ?>
     48                    <p><?php bbp_is_user_home()
     49                        ? esc_html_e( 'You are not currently subscribed to any topics.',      'bbpress' )
     50                        : esc_html_e( 'This user is not currently subscribed to any topics.', 'bbpress' );
     51                    ?></p>
    4952
    50                         <p><?php bbp_is_user_home()
    51                             ? esc_html_e( 'You are not currently subscribed to any topics.',      'bbpress' )
    52                             : esc_html_e( 'This user is not currently subscribed to any topics.', 'bbpress' );
    53                         ?></p>
     53                <?php endif; ?>
    5454
    55                     <?php endif; ?>
    56 
    57                 </div>
    58             </div><!-- #bbp-user-subscriptions -->
    59 
    60         <?php endif; ?>
     55            </div>
     56        </div><!-- #bbp-user-subscriptions -->
    6157
    6258    <?php endif; ?>
    6359
    64     <?php do_action( 'bbp_template_after_user_subscriptions' ); ?>
     60<?php endif; ?>
     61
     62<?php do_action( 'bbp_template_after_user_subscriptions' );
  • trunk/src/templates/default/bbpress/user-topics-created.php

    r5688 r5689  
    88 */
    99
    10 ?>
     10do_action( 'bbp_template_before_user_topics_created' ); ?>
    1111
    12     <?php do_action( 'bbp_template_before_user_topics_created' ); ?>
     12<div id="bbp-user-topics-started" class="bbp-user-topics-started">
     13    <h2 class="entry-title"><?php esc_html_e( 'Forum Topics Started', 'bbpress' ); ?></h2>
     14    <div class="bbp-user-section">
    1315
    14     <div id="bbp-user-topics-started" class="bbp-user-topics-started">
    15         <h2 class="entry-title"><?php esc_html_e( 'Forum Topics Started', 'bbpress' ); ?></h2>
    16         <div class="bbp-user-section">
     16        <?php if ( bbp_get_user_topics_started() ) : ?>
    1717
    18             <?php if ( bbp_get_user_topics_started() ) : ?>
     18            <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    1919
    20                 <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
     20            <?php bbp_get_template_part( 'loop',      'topics' ); ?>
    2121
    22                 <?php bbp_get_template_part( 'loop',      'topics' ); ?>
     22            <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    2323
    24                 <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
     24        <?php else : ?>
    2525
    26             <?php else : ?>
     26            <p><?php bbp_is_user_home()
     27                ? esc_html_e( 'You have not created any topics.',      'bbpress' )
     28                : esc_html_e( 'This user has not created any topics.', 'bbpress' );
     29            ?></p>
    2730
    28                 <p><?php bbp_is_user_home()
    29                     ? esc_html_e( 'You have not created any topics.',      'bbpress' )
    30                     : esc_html_e( 'This user has not created any topics.', 'bbpress' );
    31                 ?></p>
     31        <?php endif; ?>
    3232
    33             <?php endif; ?>
     33    </div>
     34</div><!-- #bbp-user-topics-started -->
    3435
    35         </div>
    36     </div><!-- #bbp-user-topics-started -->
    37 
    38     <?php do_action( 'bbp_template_after_user_topics_created' ); ?>
     36<?php do_action( 'bbp_template_after_user_topics_created' );
Note: See TracChangeset for help on using the changeset viewer.