Ticket #6802: 6802.patch
| File 6802.patch, 8.6 kB (added by Viper007Bond, 6 months ago) |
|---|
-
wp-admin/includes/schema.php
old new 250 250 add_option('medium_size_w', 300); 251 251 add_option('medium_size_h', 300); 252 252 253 // 2.5.1 254 add_option('avatar_default', 'default'); 255 add_option('avatar_custom'); 256 253 257 // Delete unused options 254 258 $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'); 255 259 foreach ($unusedoptions as $option) : -
wp-admin/options-discussion.php
old new 84 84 85 85 <table class="form-table"> 86 86 <tr valign="top"> 87 <th scope="row"><?php _e('Avatar display') ?></th>87 <th scope="row"><?php _e('Avatar Display') ?></th> 88 88 <td> 89 89 <?php 90 90 $yesorno = array(0 => __("Don’t show Avatars"), 1 => __('Show Avatars')); 91 91 foreach ( $yesorno as $key => $value) { 92 92 $selected = (get_option('show_avatars') == $key) ? 'checked="checked"' : ''; 93 echo "\n\t<label><input type='radio' name='show_avatars' value='$key' $selected > $value</label><br />";93 echo "\n\t<label><input type='radio' name='show_avatars' value='$key' $selected/> $value</label><br />"; 94 94 } 95 95 ?> 96 96 </td> … … 103 103 $ratings = array( 'G' => __('G — Suitable for all audiences'), 'PG' => __('PG — Possibly offensive, usually for audiences 13 and above'), 'R' => __('R — Intended for adult audiences above 17'), 'X' => __('X — Even more mature than above')); 104 104 foreach ($ratings as $key => $rating) : 105 105 $selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : ''; 106 echo "\n\t<label><input type='radio' name='avatar_rating' value='$key' $selected > $rating</label><br />";106 echo "\n\t<label><input type='radio' name='avatar_rating' value='$key' $selected/> $rating</label><br />"; 107 107 endforeach; 108 108 ?> 109 109 110 110 </td> 111 111 </tr> 112 <tr valign="top"> 113 <th scope="row"><?php _e('Default Avatar') ?></th> 114 <td class="defaultavatarpicker"> 112 115 116 <?php _e('For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address.'); ?><br /> 117 118 <?php 119 $defaults = apply_filters( 'avatar_defaults', array() ); 120 $size = 32; 121 foreach ( $defaults as $key => $default ) { 122 $selected = (get_option('avatar_default') == $key) ? 'checked="checked" ' : ''; 123 echo "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$key}' value='{$key}' {$selected}/> "; 124 125 if ( 'default' == $key || 'gravatarlogo' == $key ) 126 echo "<img alt='' src='" . htmlspecialchars( 'http://www.gravatar.com/avatar/' . $default[1] . "?s={$size}" ) . "' class='avatar avatar-{$size}' height='{$size}' width='{$size}' />"; 127 elseif ( 'custom' != $key ) 128 echo get_avatar( 'ad516503a11cd5ca435acc9bb6523536', $size, $default[1] ); 129 elseif ( 'custom' == $key && !empty($default[1]) ) 130 echo "<img alt='' src='" . htmlspecialchars( add_query_arg( 's', $size, $default[1] ) ) . "' class='avatar avatar-{$size}' height='{$size}' width='{$size}' />"; 131 132 echo ' ' . $default[0] . '</label>'; 133 if ( 'custom' == $key ) echo ': <input type="text" name="avatar_custom" value="' . attribute_escape ( $default[1] ) . '" size="75" class="code" onfocus="document.getElementById(\'avatar_custom\').checked = \'checked\';" />'; 134 echo '<br />'; 135 } 136 ?> 137 138 </td> 139 </tr> 140 113 141 </table> 114 142 115 143 116 144 <p class="submit"> 117 145 <input type="hidden" name="action" value="update" /> 118 <input type="hidden" name="page_options" value="default_pingback_flag,default_ping_status,default_comment_status,comments_notify,moderation_notify,comment_moderation,require_name_email,comment_whitelist,comment_max_links,moderation_keys,blacklist_keys,show_avatars,avatar_rating " />146 <input type="hidden" name="page_options" value="default_pingback_flag,default_ping_status,default_comment_status,comments_notify,moderation_notify,comment_moderation,require_name_email,comment_whitelist,comment_max_links,moderation_keys,blacklist_keys,show_avatars,avatar_rating,avatar_default,avatar_custom" /> 119 147 <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" /> 120 148 </p> 121 149 </form> -
wp-admin/wp-admin.css
old new 1341 1341 vertical-align:text-top; 1342 1342 } 1343 1343 1344 .defaultavatarpicker .avatar { 1345 margin: 2px 0; 1346 vertical-align: middle; 1347 } 1348 1344 1349 body.minwidth { 1345 1350 min-width: 808px; 1346 1351 } -
wp-includes/default-filters.php
old new 153 153 add_filter('comment_flood_filter', 'wp_throttle_comment_flood', 10, 3); 154 154 add_filter('pre_comment_content', 'wp_rel_nofollow', 15); 155 155 add_filter('comment_email', 'antispambot'); 156 add_filter('avatar_defaults', 'avatar_defaults_filter', 5); 156 157 157 158 //Atom SSL support 158 159 add_filter('atom_service_url','atom_service_url_filter'); -
wp-includes/functions.php
old new 1749 1749 return $default; 1750 1750 } 1751 1751 1752 ?> 1752 /** 1753 * avatar_defaults_filter() - Returns an array of default avatars for the user to pick from. 1754 * 1755 * @since 2.5.1 1756 * @param array $defaults Existing array of default avatars 1757 */ 1758 function avatar_defaults_filter( $defaults ) { 1759 $avatar_defaults = array( 1760 'default' => array( __('Default'), 'ad516503a11cd5ca435acc9bb6523536' ), // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com') 1761 'gravatarlogo' => array( __('Gravatar Logo'), 'default' ), 1762 'identicon' => array( __('Identicon (Generated)'), 'identicon' ), 1763 'wavatar' => array( __('Wavatar (Generated)'), 'wavatar' ), 1764 'monsterid' => array( __('MonsterID (Generated)'), 'monsterid' ), 1765 'custom' => array( __('Custom'), get_option('avatar_custom') ) 1766 ); 1767 1768 return $defaults + $avatar_defaults; 1769 } 1770 1771 ?> -
wp-includes/pluggable.php
old new 1235 1235 $email = $id_or_email; 1236 1236 } 1237 1237 1238 $defaults = apply_filters( 'avatar_defaults', array() ); 1239 $avatar_default = get_option('avatar_default'); 1240 1241 if ( empty($default) && 'custom' == $avatar_default && !empty($defaults[$avatar_default][1]) ) 1242 $default = add_query_arg( 's', $size, $defaults[$avatar_default][1] ); 1243 1244 if ( empty($default) && ( 'default' == $avatar_default || 'gravatarlogo' == $avatar_default ) ) 1245 $default = 'http://www.gravatar.com/avatar/' . $defaults[$avatar_default][1] . "?s={$size}"; 1246 1247 if ( empty($default) && !empty($email) && isset($defaults[$avatar_default]) ) 1248 $default = $defaults[$avatar_default][1]; 1249 1238 1250 if ( empty($default) ) 1239 $default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=$size"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')1251 $default = 'http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536'; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com') 1240 1252 1241 1253 if ( !empty($email) ) { 1242 1254 $out = 'http://www.gravatar.com/avatar/'; -
wp-includes/version.php
old new 16 16 * 17 17 * @global int $wp_db_version 18 18 */ 19 $wp_db_version = 7 796;19 $wp_db_version = 7827; 20 20 21 21 ?>
