Ticket #28344: 28344.2.diff
File 28344.2.diff, 5.8 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 dd36834..734e29b 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 662184a..e07eca5 100644
if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?> 114 114 </td> 115 115 </tr> 116 116 <?php } ?> 117 </table> 118 <h3 class="title"><?php _e( 'Locale' ); ?></h3> 119 <table class="form-table"> 117 120 <tr> 118 121 <?php 119 122 $current_offset = get_option('gmt_offset'); … … if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists 274 277 </fieldset> 275 278 </td> 276 279 </tr> 277 <tr>278 <th scope="row"><label for="start_of_week"><?php _e('Week Starts On') ?></label></th>279 <td><select name="start_of_week" id="start_of_week">280 <?php281 /**282 * @global WP_Locale $wp_locale283 */284 global $wp_locale;285 286 for ($day_index = 0; $day_index <= 6; $day_index++) :287 $selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';288 echo "\n\t<option value='" . esc_attr($day_index) . "' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';289 endfor;290 ?>291 </select></td>292 </tr>293 280 <?php do_settings_fields('general', 'default'); ?> 294 281 295 282 <?php -
src/wp-admin/options.php
diff --git src/wp-admin/options.php src/wp-admin/options.php index 6bad0fd..d5d5acf 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 e9ddc47..9fdd320 100644
add_action( 'wp_head', 'wp_post_preview_js', 1 ); 305 305 // Timezone 306 306 add_filter( 'pre_option_gmt_offset','wp_timezone_override_offset' ); 307 307 308 // Start of the week. 309 add_filter( 'default_option_start_of_week', '_wp_get_start_of_week' ); 310 308 311 // Admin Color Schemes 309 312 add_action( 'admin_init', 'register_admin_color_schemes', 1); 310 313 add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); … … add_action( 'delete_attachment', '_delete_attachment_theme_mod' ); 355 358 // Calendar widget cache 356 359 add_action( 'save_post', 'delete_get_calendar_cache' ); 357 360 add_action( 'delete_post', 'delete_get_calendar_cache' ); 358 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );359 361 add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' ); 360 362 361 363 // Author -
src/wp-includes/functions.php
diff --git src/wp-includes/functions.php src/wp-includes/functions.php index a275023..750220f 100644
function _mce_set_direction( $input ) { 2928 2928 return $input; 2929 2929 } 2930 2930 2931 /** 2932 * Retrieve the start of the week setting. 2933 * 2934 * @since 4.4.0 2935 * @access private 2936 * 2937 * @global WP_Locale $wp_locale 2938 * 2939 * @param string $value The option value. 2940 * @return int The start of the week set by the locale. 2941 */ 2942 function _wp_get_start_of_week( $value ) { 2943 global $wp_locale; 2944 return (int) $wp_locale->start_of_week; 2945 } 2931 2946 2932 2947 /** 2933 2948 * 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 ded3378..46e0836 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 { 114 121 $this->weekday_initial[ __( 'Friday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'F', 'Friday initial' ); 115 122 $this->weekday_initial[ __( 'Saturday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Saturday initial' ); 116 123 124 // Start of the week. 125 $this->start_of_week = /* translators: default start of the week. 0 = Sunday, 1 = Monday */ _x( '1', 'start of week' ); 126 117 127 // Abbreviations for each day. 118 128 $this->weekday_abbrev[__('Sunday')] = /* translators: three-letter abbreviation of the weekday */ __('Sun'); 119 129 $this->weekday_abbrev[__('Monday')] = /* translators: three-letter abbreviation of the weekday */ __('Mon');