Ticket #30161: 30161.3.diff
File 30161.3.diff, 1.4 KB (added by , 10 years ago) |
---|
-
wp-admin/options-discussion.php
215 215 216 216 <?php 217 217 $avatar_defaults = array( 218 'mystery' => __('Mystery Man'),218 'mystery' => __('Mystery Person'), 219 219 'blank' => __('Blank'), 220 'identicon' => __('Identicon (Generated)') 221 ); 222 223 $avatars_old = array ( 220 224 'gravatar_default' => __('Gravatar Logo'), 221 'identicon' => __('Identicon (Generated)'),222 225 'wavatar' => __('Wavatar (Generated)'), 223 226 'monsterid' => __('MonsterID (Generated)'), 224 227 'retro' => __('Retro (Generated)') 225 228 ); 229 226 230 /** 227 231 * Filter the default avatars. 228 232 * … … 235 239 */ 236 240 $avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults ); 237 241 $default = get_option('avatar_default'); 238 if ( empty($default) ) 242 if ( empty($default) ) { 239 243 $default = 'mystery'; 244 } 245 246 if ( in_array( $default, array_keys( $avatars_old ) ) ) { 247 $avatar_defaults[$default] = $avatars_old[$default]; 248 } 249 240 250 $size = 32; 241 251 $avatar_list = ''; 242 252 foreach ( $avatar_defaults as $default_key => $default_name ) { 243 253 $selected = ($default == $default_key) ? 'checked="checked" ' : ''; 254 244 255 $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> "; 245 256 246 257 $avatar = get_avatar( $user_email, $size, $default_key );