Making WordPress.org


Ignore:
Timestamp:
08/04/2017 10:11:01 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Move "My Account" section to the top of the sidebar, where it's more discoverable for users.

See #2951.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sidebar.php

    r5751 r5752  
    11<div class="entry-meta sidebar">
     2
     3    <?php if ( is_user_logged_in() ) : ?>
     4
     5        <div class="my-account">
     6            <ul>
     7                <li><?php echo sprintf( __( 'Howdy, %s', 'wporg-forums' ), '<a href="' . esc_url( bbp_get_user_profile_url( bbp_get_current_user_id() ) ) . '">' . bbp_get_current_user_name() . '</a>' ); ?></li>
     8                <li><a href="<?php echo esc_url( wp_logout_url() ); ?>"><?php _e( 'Log Out', 'wporg-forums' ); ?></a></li>
     9            </ul>
     10        </div>
     11
     12    <?php endif; ?>
    213
    314    <?php if ( function_exists( 'is_bbpress' ) && ( is_bbpress() ) || is_page() ) : ?>
     
    617
    718            <div>
    8                 <!--h4><?php //_e( 'Forum Info', 'wporg-forums' ); ?></h4-->
    919                <ul class="forum-info">
    1020                    <?php bb_base_single_forum_description(); ?>
     
    2939
    3040            <div>
    31                 <?php if ( wporg_support_is_single_review() ) : ?>
    32                     <!--h3><?php //_e( 'Review Info', 'wporg-forums' ); ?></h3-->
    33                 <?php else : ?>
    34                     <!-- h3><?php //_e( 'Topic Info', 'wporg-forums' ); ?></h3-->
    35                 <?php endif; ?>
    36 
    3741                <ul class="topic-info">
    3842                    <?php bb_base_single_topic_description(); ?>
     
    116120    <?php endif; ?>
    117121
    118     <?php if ( is_user_logged_in() ) : ?>
    119 
    120         <div class="my-account">
    121             <h4><?php _e( 'My Account', 'wporg-forums' ); ?></h4>
    122             <ul>
    123                 <li><?php echo sprintf( __( 'Howdy, %s', 'wporg-forums' ), '<a href="' . esc_url( bbp_get_user_profile_url( bbp_get_current_user_id() ) ) . '">' . bbp_get_current_user_name() . '</a>' ); ?></li>
    124                 <li><a href="<?php echo esc_url( wp_logout_url() ); ?>"><?php _e( 'Log Out', 'wporg-forums' ); ?></a></li>
    125             </ul>
    126         </div>
    127 
    128     <?php endif; ?>
    129 
    130122</div>
Note: See TracChangeset for help on using the changeset viewer.