Changeset 9076
- Timestamp:
- 10/03/08 03:20:54 (2 months ago)
- Files:
-
- trunk/wp-includes/pluggable.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/pluggable.php
r9075 r9076 1455 1455 * @param int $size Size of the avatar image 1456 1456 * @param string $default URL to a default image to use if no avatar is available 1457 * @param string $alt Alternate text to use in image tag 1457 * @param string $alt Alternate text to use in image tag, the default is Avatar 1458 1458 * @return string <img> tag for the user's avatar 1459 1459 */ 1460 function get_avatar( $id_or_email, $size = '96', $default = '', $alt = 'Avatar') {1460 function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) { 1461 1461 if ( ! get_option('show_avatars') ) 1462 1462 return false; 1463 1464 if ( false === $alt) 1465 $alt = __( 'Avatar' ); 1466 1467 $safe_alt = attribute_escape( $alt ); 1463 1468 1464 1469 if ( !is_numeric($size) ) … … 1518 1523 $out .= "&r={$rating}"; 1519 1524 1520 $avatar = "<img alt='{$ alt}' src='{$out}' class='avatar avatar-{$size}' height='{$size}' width='{$size}' />";1525 $avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size}' height='{$size}' width='{$size}' />"; 1521 1526 } else { 1522 $avatar = "<img alt='{$ alt}' src='{$default}' class='avatar avatar-{$size} avatar-default' height='{$size}' width='{$size}' />";1527 $avatar = "<img alt='{$safe_alt}' src='{$default}' class='avatar avatar-{$size} avatar-default' height='{$size}' width='{$size}' />"; 1523 1528 } 1524 1529
