get_avatar_data

get_avatar_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('get_avatar_data') is found 3 times:

  • /wp-includes/link-template.php line 4484
    4480
    4481
    4482
    4483
    4484
    4485
    4486
    4487
    4488
    4489
    $args = apply_filters( 'pre_get_avatar_data', $args, $id_or_email );
     
    if ( isset( $args['url'] ) ) {
        /** This filter is documented in wp-includes/link-template.php */
        return apply_filters( 'get_avatar_data', $args, $id_or_email );
    }
     
    $email_hash = '';
    $user       = false;
    $email      = false;
  • /wp-includes/link-template.php line 4516
    4512
    4513
    4514
    4515
    4516
    4517
    4518
    4519
    4520
    4521
    4522
    } elseif ( $id_or_email instanceof WP_Comment ) {
        if ( ! is_avatar_comment_type( get_comment_type( $id_or_email ) ) ) {
            $args['url'] = false;
            /** This filter is documented in wp-includes/link-template.php */
            return apply_filters( 'get_avatar_data', $args, $id_or_email );
        }
     
        if ( ! empty( $id_or_email->user_id ) ) {
            $user = get_user_by( 'id', (int) $id_or_email->user_id );
        }
        if ( ( ! $user || is_wp_error( $user ) ) && ! empty( $id_or_email->comment_author_email ) ) {
  • /wp-includes/link-template.php line 4582
    4578
    4579
    4580
    4581
    4582
    4583
    4584
    4585
    4586
    4587
    4588
         * @param array $args        Arguments passed to get_avatar_data(), after processing.
         * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash,
         *                           user email, WP_User object, WP_Post object, or WP_Comment object.
         */
        return apply_filters( 'get_avatar_data', $args, $id_or_email );
    }
     
    /**
     * Retrieves the URL of a file in the theme.
     *
     * Searches in the stylesheet directory before the template directory so themes