Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/16/2015 10:54:11 PM (9 years ago)
Author:
imath
Message:

Avatar UI: use it in wp-admin/extended profile.

Clicking on the "Edit Profile Photo" link from the avatar metabox will open a thickbox window in which the Avatar UI will be displayed.

See #6290

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-admin.php

    r9665 r9759  
    218218     */
    219219    private function get_user_id() {
    220         $user_id = get_current_user_id();
    221 
    222         // We'll need a user ID when not on the user admin
     220        if ( ! empty( $this->user_id ) ) {
     221            return $this->user_id;
     222        }
     223
     224        $this->user_id = (int) get_current_user_id();
     225
     226        // We'll need a user ID when not on self profile
    223227        if ( ! empty( $_GET['user_id'] ) ) {
    224             $user_id = $_GET['user_id'];
    225         }
    226 
    227         return intval( $user_id );
     228            $this->user_id = (int) $_GET['user_id'];
     229        }
     230
     231        return $this->user_id;
    228232    }
    229233
Note: See TracChangeset for help on using the changeset viewer.