Add blank to default avatars. Rename default to Mystery Man. see #6802
git-svn-id: https://develop.svn.wordpress.org/trunk@7886 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e668d3e404
commit
1288013605
@ -254,7 +254,7 @@ function populate_options() {
|
||||
add_option('medium_size_h', 300);
|
||||
|
||||
// 2.6
|
||||
add_option('avatar_default', 'default');
|
||||
add_option('avatar_default', 'mystery');
|
||||
|
||||
// Delete unused options
|
||||
$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval');
|
||||
|
@ -78,7 +78,7 @@ include('admin-header.php');
|
||||
|
||||
<h3><?php _e('Avatars') ?></h3>
|
||||
|
||||
<p><?php _e('By default WordPress uses <a href="http://gravatar.com/">Gravatars</a> — short for Globally Recognized Avatars — for the pictures that show up next to comments. Plugins may override this.'); ?></p>
|
||||
<p><?php _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your blog.'); ?></p>
|
||||
|
||||
<?php // the above would be a good place to link to codex documentation on the gravatar functions, for putting it in themes. anything like that? ?>
|
||||
|
||||
@ -117,7 +117,8 @@ endforeach;
|
||||
|
||||
<?php
|
||||
$avatar_defaults = array(
|
||||
'default' => __('Default'),
|
||||
'mystery' => __('Mystery Man'),
|
||||
'blank' => __('Blank'),
|
||||
'gravatar_default' => __('Gravatar Logo'),
|
||||
'identicon' => __('Identicon (Generated)'),
|
||||
'wavatar' => __('Wavatar (Generated)'),
|
||||
@ -126,7 +127,7 @@ $avatar_defaults = array(
|
||||
$avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults);
|
||||
$default = get_option('avatar_default');
|
||||
if ( empty($default) )
|
||||
$default = 'default';
|
||||
$default = 'mystery';
|
||||
$size = 32;
|
||||
$avatar_list = '';
|
||||
foreach ( $avatar_defaults as $default_key => $default_name ) {
|
||||
|
BIN
wp-includes/images/blank.gif
Normal file
BIN
wp-includes/images/blank.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 B |
@ -1246,15 +1246,17 @@ function get_avatar( $id_or_email, $size = '96', $default = '' ) {
|
||||
if ( empty($default) ) {
|
||||
$avatar_default = get_option('avatar_default');
|
||||
if ( empty($avatar_default) )
|
||||
$default = 'default';
|
||||
$default = 'mystery';
|
||||
else
|
||||
$default = $avatar_default;
|
||||
}
|
||||
|
||||
if ( 'custom' == $default )
|
||||
$default = add_query_arg( 's', $size, $defaults[$avatar_default][1] );
|
||||
elseif ( 'default' == $default )
|
||||
elseif ( 'mystery' == $default )
|
||||
$default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
|
||||
elseif ( 'blank' == $default )
|
||||
$default = get_option('siteurl') . '/wp-includes/images/blank.gif';
|
||||
elseif ( !empty($email) && 'gravatar_default' == $default )
|
||||
$default = '';
|
||||
elseif ( 'gravatar_default' == $default )
|
||||
|
Loading…
Reference in New Issue
Block a user