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. Built from https://develop.svn.wordpress.org/trunk@32845 git-svn-id: http://core.svn.wordpress.org/trunk@32816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c1a9c4b7b8
commit
09c4444150
|
@ -109,8 +109,6 @@ if ( ! $credits ) {
|
||||||
|
|
||||||
echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
|
echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
|
||||||
|
|
||||||
$gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/';
|
|
||||||
|
|
||||||
foreach ( $credits['groups'] as $group_slug => $group_data ) {
|
foreach ( $credits['groups'] as $group_slug => $group_data ) {
|
||||||
if ( $group_data['name'] ) {
|
if ( $group_data['name'] ) {
|
||||||
if ( 'Translators' == $group_data['name'] ) {
|
if ( 'Translators' == $group_data['name'] ) {
|
||||||
|
@ -144,8 +142,11 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
|
||||||
foreach ( $group_data['data'] as $person_data ) {
|
foreach ( $group_data['data'] as $person_data ) {
|
||||||
echo '<li class="wp-person" id="wp-person-' . $person_data[2] . '">' . "\n\t";
|
echo '<li class="wp-person" id="wp-person-' . $person_data[2] . '">' . "\n\t";
|
||||||
echo '<a href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">';
|
echo '<a href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">';
|
||||||
$size = 'compact' == $group_data['type'] ? '30' : '60';
|
$size = 'compact' == $group_data['type'] ? 30 : 60;
|
||||||
echo '<img src="' . $gravatar . $person_data[1] . '?s=' . $size . '" srcset="' . $gravatar . $person_data[1] . '?s=' . $size * 2 . ' 2x" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
|
$data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
|
||||||
|
$size *= 2;
|
||||||
|
$data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
|
||||||
|
echo '<img src="' . esc_attr( $data['url'] ) . '" srcset="' . esc_attr( $data2x['url'] ) . ' 2x" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
|
||||||
echo '<a class="web" href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">' . $person_data[0] . "</a>\n\t";
|
echo '<a class="web" href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">' . $person_data[0] . "</a>\n\t";
|
||||||
if ( ! $compact )
|
if ( ! $compact )
|
||||||
echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
|
echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
|
||||||
|
|
|
@ -102,6 +102,7 @@ function get_last_build_date_feed() {
|
||||||
|
|
||||||
if ( $wp_query->have_posts() ) {
|
if ( $wp_query->have_posts() ) {
|
||||||
$post_ids = array();
|
$post_ids = array();
|
||||||
|
$post_times = array();
|
||||||
foreach( $wp_query->posts as $post ) {
|
foreach( $wp_query->posts as $post ) {
|
||||||
$post_ids[] = $post->ID;
|
$post_ids[] = $post->ID;
|
||||||
$post_times[] = $post->post_modified_gmt;
|
$post_times[] = $post->post_modified_gmt;
|
||||||
|
|
|
@ -3650,7 +3650,11 @@ function get_avatar_data( $id_or_email, $args = null ) {
|
||||||
'r' => $args['rating'],
|
'r' => $args['rating'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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 = sprintf( 'http://%d.gravatar.com/avatar/%s', $gravatar_server, $email_hash );
|
||||||
|
}
|
||||||
|
|
||||||
$url = add_query_arg(
|
$url = add_query_arg(
|
||||||
rawurlencode_deep( array_filter( $url_args ) ),
|
rawurlencode_deep( array_filter( $url_args ) ),
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-alpha-32844';
|
$wp_version = '4.3-alpha-32845';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue