Making WordPress.org

Ticket #2031: meta-2031.patch

File meta-2031.patch, 2.5 KB (added by SergeyBiryukov, 9 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/bbpress/user-profile.php

     
     1<?php
     2
     3/**
     4 * User Profile
     5 *
     6 * @package bbPress
     7 * @subpackage Theme
     8 */
     9
     10do_action( 'bbp_template_before_user_profile' ); ?>
     11
     12<div id="bbp-user-profile" class="bbp-user-profile">
     13        <h2 class="entry-title"><?php esc_html_e( 'Profile', 'wporg-forums' ); ?></h2>
     14        <div class="bbp-user-section">
     15
     16                <?php if ( bbp_get_displayed_user_field( 'description' ) ) : ?>
     17
     18                        <p class="bbp-user-description"><?php bbp_displayed_user_field( 'description' ); ?></p>
     19
     20                <?php endif; ?>
     21
     22                <p class="bbp-user-forum-role"><?php   printf( esc_html__( 'Forum Role: %s',      'wporg-forums' ), bbp_get_user_display_role()    ); ?></p>
     23                <p class="bbp-user-member-since"><?php printf( esc_html__( 'Member Since: %s',    'wporg-forums' ), wporg_support_get_user_registered_date() ); ?></p>
     24                <p class="bbp-user-topic-count"><?php  printf( esc_html__( 'Topics Started: %s',  'wporg-forums' ), bbp_get_user_topic_count_raw() ); ?></p>
     25                <p class="bbp-user-reply-count"><?php  printf( esc_html__( 'Replies Created: %s', 'wporg-forums' ), bbp_get_user_reply_count_raw() ); ?></p>
     26        </div>
     27</div><!-- #bbp-author-topics-started -->
     28
     29<?php do_action( 'bbp_template_after_user_profile' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/functions.php

     
    175172// Temporarily remove the redirect to `https://profiles.wordpress.org/`, see #meta1868.
    176173// add_filter( 'bbp_pre_get_user_profile_url', 'wporg_support_profile_url' );
    177174
     175/**
     176 * Get user's registration date.
     177 */
     178function wporg_support_get_user_registered_date( $user_id = 0 ) {
     179        $user = get_userdata( bbp_get_user_id( $user_id ) );
     180
     181        return mysql2date( 'F jS, Y', $user->user_registered );
     182}
     183
    178184/** bb Base *******************************************************************/
    179185
    180186function bb_base_search_form() {