WordPress.org

Making WordPress.org

Changeset 4477


Ignore:
Timestamp:
12/04/16 20:09:59 (14 months ago)
Author:
jmdodd
Message:

Support Theme: Add logged-in user account link.

Provide forum users with a link into their own bbPress profile page, where they can manage their favorites and subscriptions.

This functionality can be integrated into the support header once we have a more unified user profile.

See #2167.

File:
1 edited

Legend:

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

    r4248 r4477  
    143143    <?php endif; ?> 
    144144 
     145    <?php if ( is_user_logged_in() ) : ?> 
     146 
     147        <div> 
     148            <h4><?php _e( 'My Account', 'wporg-forums' ); ?></h4> 
     149            <ul> 
     150                <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> 
     151                <li><a href="<?php echo esc_url( wp_logout_url() ); ?>"><?php _e( 'Log Out', 'wporg-forums' ); ?></a></li> 
     152            </ul> 
     153        </div> 
     154 
     155    <?php endif; ?> 
     156 
    145157</div> 
Note: See TracChangeset for help on using the changeset viewer.