Ticket #28344: 28344.diff
File 28344.diff, 5.6 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/schema.php
diff --git src/wp-admin/includes/schema.php src/wp-admin/includes/schema.php index 75e8f5b..ae5a4d5 100644
function populate_options() { 385 385 'blogdescription' => __('Just another WordPress site'), 386 386 'users_can_register' => 0, 387 387 'admin_email' => 'you@example.com', 388 /* translators: default start of the week. 0 = Sunday, 1 = Monday */389 'start_of_week' => _x( '1', 'start of week' ),390 388 'use_balanceTags' => 0, 391 389 'use_smilies' => 1, 392 390 'require_name_email' => 1, -
src/wp-admin/options-general.php
diff --git src/wp-admin/options-general.php src/wp-admin/options-general.php index cbb7d2f..726cb83 100644
if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?> 167 167 </td> 168 168 </tr> 169 169 <?php } ?> 170 </table> 171 <h3 class="title"><?php _e( 'Locale' ); ?></h3> 172 <table class="form-table"> 170 173 <tr> 171 174 <?php 172 175 $current_offset = get_option('gmt_offset'); … … if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists 317 320 </fieldset> 318 321 </td> 319 322 </tr> 320 <tr>321 <th scope="row"><label for="start_of_week"><?php _e('Week Starts On') ?></label></th>322 <td><select name="start_of_week" id="start_of_week">323 <?php324 /**325 * @global WP_Locale $wp_locale326 */327 global $wp_locale;328 329 for ($day_index = 0; $day_index <= 6; $day_index++) :330 $selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';331 echo "\n\t<option value='" . esc_attr($day_index) . "' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';332 endfor;333 ?>334 </select></td>335 </tr>336 323 <?php do_settings_fields('general', 'default'); ?> 337 324 338 325 <?php -
src/wp-admin/options.php
diff --git src/wp-admin/options.php src/wp-admin/options.php index a4809cf..0f1be69 100644
if ( is_multisite() && ! is_super_admin() && 'update' != $action ) { 82 82 } 83 83 84 84 $whitelist_options = array( 85 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', ' start_of_week', 'timezone_string', 'WPLANG' ),85 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'timezone_string', 'WPLANG' ), 86 86 'discussion' => array( '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', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), 87 87 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ), 88 88 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ), -
src/wp-includes/default-filters.php
diff --git src/wp-includes/default-filters.php src/wp-includes/default-filters.php index b6f0ce3..e7e45ad 100644
add_action( 'wp_head', 'wp_post_preview_js', 1 ); 303 303 // Timezone 304 304 add_filter( 'pre_option_gmt_offset','wp_timezone_override_offset' ); 305 305 306 // Start of the week. 307 add_filter( 'pre_option_start_of_week','_wp_get_start_of_week' ); 308 306 309 // Admin Color Schemes 307 310 add_action( 'admin_init', 'register_admin_color_schemes', 1); 308 311 add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); … … add_action( 'delete_attachment', '_delete_attachment_theme_mod' ); 346 349 // Calendar widget cache 347 350 add_action( 'save_post', 'delete_get_calendar_cache' ); 348 351 add_action( 'delete_post', 'delete_get_calendar_cache' ); 349 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );350 352 add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' ); 351 353 352 354 // Author -
src/wp-includes/functions.php
diff --git src/wp-includes/functions.php src/wp-includes/functions.php index 9206f9b..ca79ebf 100644
function _mce_set_direction( $input ) { 2974 2974 return $input; 2975 2975 } 2976 2976 2977 /** 2978 * Retrieve the start of the week setting. 2979 * 2980 * @since 4.4.0 2981 * @access private 2982 * 2983 * @global WP_Locale $wp_locale 2984 * 2985 * @param string $value The option value. 2986 * @return int The start of the week set by the locale. 2987 */ 2988 function _wp_get_start_of_week( $value ) { 2989 global $wp_locale; 2990 return (int) $wp_locale->start_of_week; 2991 } 2977 2992 2978 2993 /** 2979 2994 * Convert smiley code to the icon graphic file equivalent. -
src/wp-includes/locale.php
diff --git src/wp-includes/locale.php src/wp-includes/locale.php index 1319c49..fdf1b91 100644
class WP_Locale { 42 42 public $weekday_abbrev; 43 43 44 44 /** 45 * Stores the default start of the week. 46 * 47 * @var string 48 */ 49 public $start_of_week; 50 51 /** 45 52 * Stores the translated strings for the full month names. 46 53 * 47 54 * @since 2.1.0 … … class WP_Locale { 119 126 $this->weekday_initial[$weekday_] = preg_replace('/_.+_initial$/', '', $weekday_initial_); 120 127 } 121 128 129 // Start of the week. 130 $this->start_of_week = /* translators: default start of the week. 0 = Sunday, 1 = Monday */ _x( '1', 'start of week' ); 131 122 132 // Abbreviations for each day. 123 133 $this->weekday_abbrev[__('Sunday')] = /* translators: three-letter abbreviation of the weekday */ __('Sun'); 124 134 $this->weekday_abbrev[__('Monday')] = /* translators: three-letter abbreviation of the weekday */ __('Mon');