Changeset 59532 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 12/17/2024 11:56:28 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r59113 r59532 4290 4290 * @since 4.2.0 4291 4291 * 4292 * @param mixed $id_or_email The avatar to retrieve a URL for. Accepts a user ID, Gravatar MD5 hash,4292 * @param mixed $id_or_email The avatar to retrieve a URL for. Accepts a user ID, Gravatar SHA-256 or MD5 hash, 4293 4293 * user email, WP_User object, WP_Post object, or WP_Comment object. 4294 4294 * @param array $args { … … 4354 4354 * @since 4.2.0 4355 4355 * @since 6.7.0 Gravatar URLs always use HTTPS. 4356 * 4357 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, 4356 * @since 6.8.0 Gravatar URLs use the SHA-256 hashing algorithm. 4357 * 4358 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, 4358 4359 * user email, WP_User object, WP_Post object, or WP_Comment object. 4359 4360 * @param array $args { … … 4475 4476 * 4476 4477 * @param array $args Arguments passed to get_avatar_data(), after processing. 4477 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash,4478 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, 4478 4479 * user email, WP_User object, WP_Post object, or WP_Comment object. 4479 4480 */ … … 4497 4498 $user = get_user_by( 'id', absint( $id_or_email ) ); 4498 4499 } elseif ( is_string( $id_or_email ) ) { 4499 if ( str_contains( $id_or_email, '@md5.gravatar.com' ) ) { 4500 if ( str_contains( $id_or_email, '@sha256.gravatar.com' ) ) { 4501 // SHA-256 hash. 4502 list( $email_hash ) = explode( '@', $id_or_email ); 4503 } else if ( str_contains( $id_or_email, '@md5.gravatar.com' ) ) { 4500 4504 // MD5 hash. 4501 4505 list( $email_hash ) = explode( '@', $id_or_email ); … … 4531 4535 4532 4536 if ( $email ) { 4533 $email_hash = md5(strtolower( trim( $email ) ) );4537 $email_hash = hash( 'sha256', strtolower( trim( $email ) ) ); 4534 4538 } 4535 4539 } … … 4565 4569 * 4566 4570 * @param string $url The URL of the avatar. 4567 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash,4571 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, 4568 4572 * user email, WP_User object, WP_Post object, or WP_Comment object. 4569 4573 * @param array $args Arguments passed to get_avatar_data(), after processing. … … 4577 4581 * 4578 4582 * @param array $args Arguments passed to get_avatar_data(), after processing. 4579 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash,4583 * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, 4580 4584 * user email, WP_User object, WP_Post object, or WP_Comment object. 4581 4585 */
Note: See TracChangeset
for help on using the changeset viewer.