Making WordPress.org


Ignore:
Timestamp:
09/14/2016 10:10:03 AM (7 years ago)
Author:
netweb
Message:

Forums Theme: Introduce user profile template user-profile.php.

The template also adds users "registered date" to a custom profile Member Since: field on user profile pages.

Props SergeyBiryukov.
Fixes #2013.

File:
1 edited

Legend:

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

    r4053 r4055  
    175175// Temporarily remove the redirect to `https://profiles.wordpress.org/`, see #meta1868.
    176176// add_filter( 'bbp_pre_get_user_profile_url', 'wporg_support_profile_url' );
     177
     178/**
     179 * Get user's registration date.
     180 */
     181function wporg_support_get_user_registered_date( $user_id = 0 ) {
     182    $user = get_userdata( bbp_get_user_id( $user_id ) );
     183
     184    return mysql2date( 'F jS, Y', $user->user_registered );
     185}
    177186
    178187/** bb Base *******************************************************************/
Note: See TracChangeset for help on using the changeset viewer.