Changeset 31153
- Timestamp:
- 01/12/2015 12:19:34 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r31114 r31153 3389 3389 * Along with the arguments passed in $args, this will contain a couple of extra arguments. 3390 3390 * 3391 * @type bool 3392 * 3393 * @type false|string $url The URL of the avatar we found, or false if we couldn't find an avatar.3391 * @type bool $found_avatar True if we were able to find an avatar for this user, 3392 * false or not set if we couldn't. 3393 * @type string $url The URL of the avatar we found. 3394 3394 * } 3395 3395 */ … … 3548 3548 * @param int|object|string $id_or_email A user ID, email address, or comment object. 3549 3549 */ 3550 $args = apply_filters( 'get_avatar_data', $args, $id_or_email ); 3551 3552 // Don't return a broken URL if we couldn't find the email hash, and none of the filters returned a different URL. 3553 if ( ! $email_hash && $url === $args['url'] ) { 3554 $args['url'] = false; 3555 } 3556 3557 return $args; 3558 } 3550 return apply_filters( 'get_avatar_data', $args, $id_or_email ); 3551 } -
trunk/tests/phpunit/tests/avatar.php
r31152 r31153 99 99 } 100 100 101 /**102 * @ticket 21195103 */104 public function test_get_avatar_url_bad_id() {105 $this->assertFalse( get_avatar_url( false ) );106 $this->assertFalse( get_avatar_url( 100000 ) );107 }108 109 101 protected $fakeURL; 110 102 /**
Note: See TracChangeset
for help on using the changeset viewer.