bp_get_loggedin_user_avatar

Get the logged-in user's avatar.

Description

(string) bp_get_loggedin_user_avatar( (string) $args = '' ); 

Returns (string)

User avatar string.

Parameters (1)

0. $args — Optional. (string) => ''
The args.

Options

    ;        


    Usage

    1. if ( !function_exists( 'bp_get_loggedin_user_avatar' ) ) { 
    2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-members/bp-members-template.php'; 
    3.  
    4. // The args. 
    5. $args = ''; 
    6.  
    7. // NOTICE! Understand what this does before running. 
    8. $result = bp_get_loggedin_user_avatar($args); 
    9.  

    Defined (1)

    The function is defined in the following location(s).

    /bp-members/bp-members-template.php  
    1. function bp_get_loggedin_user_avatar( $args = '' ) { 
    2.  
    3. $r = wp_parse_args( $args, array( 
    4. 'item_id' => bp_loggedin_user_id(),  
    5. 'type' => 'thumb',  
    6. 'width' => false,  
    7. 'height' => false,  
    8. 'html' => true,  
    9. 'alt' => sprintf( __( 'Profile picture of %s', buddypress ), bp_get_loggedin_user_fullname() ) 
    10. ) ); 
    11.  
    12. /** 
    13. * Filters the logged in user's avatar. 
    14. * @since 1.1.0 
    15. * @param string $value User avatar string. 
    16. * @param array $r Array of parsed arguments. 
    17. * @param array $args Array of initial arguments. 
    18. */