WordPress.org

Make WordPress Core

Ticket #21930: pluggable.php.patch

File pluggable.php.patch, 800 bytes (added by jakemgold, 6 years ago)

Proposed changeset

  • wp-includes/pluggable.php

     
    16251625                        $default = $avatar_default;
    16261626        }
    16271627
     1628        // Allow hooks to set an avatar before going through Gravatar construction
     1629        $avatar = apply_filters('pre_get_avatar', '', $id_or_email, $size, $default, $alt);
     1630
     1631        if ( empty( $avatar ) ) {
    16281632        if ( !empty($email) )
    16291633                $email_hash = md5( strtolower( trim( $email ) ) );
    16301634
     
    16641668        } else {
    16651669                $avatar = "<img alt='{$safe_alt}' src='{$default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
    16661670        }
     1671        }
    16671672
    16681673        return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);
    16691674}