Changeset 58822 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 07/29/2024 01:57:11 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r58807 r58822 4329 4329 * 4330 4330 * @since 4.2.0 4331 * @since 6.7.0 Gravatar URLs always use HTTPS. 4331 4332 * 4332 4333 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, … … 4359 4360 * Default is the value of the 'avatar_rating' option. 4360 4361 * @type string $scheme URL scheme to use. See set_url_scheme() for accepted values. 4362 * For Gravatars this setting is ignored and HTTPS is used to avoid 4363 * unnecessary redirects. The setting is retained for systems using 4364 * the {@see 'pre_get_avatar_data'} filter to customize avatars. 4361 4365 * Default null. 4362 4366 * @type array $processed_args When the function returns, the value will be the processed/sanitized $args … … 4509 4513 if ( $email_hash ) { 4510 4514 $args['found_avatar'] = true; 4511 $gravatar_server = hexdec( $email_hash[0] ) % 3;4512 } else {4513 $gravatar_server = rand( 0, 2 );4514 4515 } 4515 4516 … … 4521 4522 ); 4522 4523 4523 if ( is_ssl() ) { 4524 $url = 'https://secure.gravatar.com/avatar/' . $email_hash; 4525 } else { 4526 $url = sprintf( 'http://%d.gravatar.com/avatar/%s', $gravatar_server, $email_hash ); 4527 } 4524 /* 4525 * Gravatars are always served over HTTPS. 4526 * 4527 * The Gravatar website redirects HTTP requests to HTTPS URLs so always 4528 * use the HTTPS scheme to avoid unnecessary redirects. 4529 */ 4530 $url = 'https://secure.gravatar.com/avatar/' . $email_hash; 4528 4531 4529 4532 $url = add_query_arg( 4530 4533 rawurlencode_deep( array_filter( $url_args ) ), 4531 set_url_scheme( $url, $args['scheme'] )4534 $url 4532 4535 ); 4533 4536
Note: See TracChangeset
for help on using the changeset viewer.