Make sure that all Gravatars are generated by get_avatar() or at least run through apply_filters( 'get_avatar', $avatar ) for the sake of extensibility.

Props miqrogroove, GlennM, SergeyBiryukov.
Fixes #22650.


git-svn-id: https://develop.svn.wordpress.org/trunk@32845 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-06-18 18:35:04 +00:00
parent 9bf79ed862
commit 646c19accf
3 changed files with 11 additions and 5 deletions

View File

@@ -102,6 +102,7 @@ function get_last_build_date_feed() {
if ( $wp_query->have_posts() ) {
$post_ids = array();
$post_times = array();
foreach( $wp_query->posts as $post ) {
$post_ids[] = $post->ID;
$post_times[] = $post->post_modified_gmt;

View File

@@ -3650,7 +3650,11 @@ function get_avatar_data( $id_or_email, $args = null ) {
'r' => $args['rating'],
);
$url = sprintf( 'http://%d.gravatar.com/avatar/%s', $gravatar_server, $email_hash );
if ( is_ssl() ) {
$url = 'https://secure.gravatar.com/avatar/' . $email_hash;
} else {
$url = sprintf( 'http://%d.gravatar.com/avatar/%s', $gravatar_server, $email_hash );
}
$url = add_query_arg(
rawurlencode_deep( array_filter( $url_args ) ),