Ticket #39756: 39756.diff
| File 39756.diff, 3.2 KB (added by , 9 years ago) |
|---|
-
src/wp-includes/class-wp-locale.php
105 105 public $number_format; 106 106 107 107 /** 108 * Stores the translated strings for some jQuery UI components. 109 * 110 * @since 4.8.0 111 * @var array 112 */ 113 public $jquery_ui_i18n; 114 115 /** 108 116 * Constructor which calls helper methods to set up object variables. 109 117 * 110 118 * @since 2.1.0 … … 234 242 $this->text_direction = 'ltr'; 235 243 add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) ); 236 244 } 245 246 $this->jquery_ui_i18n = array( 247 'datepicker' => array( 248 'week_header' => /* translators: header for the jQuery UI datepicker week number column */ _x( 'Wk', 'header for the jQuery UI datepicker week number column' ), 249 'year_suffix' => /* translators: suffix for the year in the jQuery UI datepicker header */ _x( '', 'suffix for the year in the jQuery UI datepicker header' ), 250 'header_order' => /* translators: 'monthyear' or 'yearmonth'. jQuery UI datepicker header options order. */ _x( 'monthyear', 'jQuery UI datepicker header options order' ) 251 ) 252 ); 237 253 } 238 254 239 255 /** -
src/wp-includes/script-loader.php
975 975 ); 976 976 977 977 $datepicker_defaults = wp_json_encode( array( 978 'closeText' => __( 'Close' ), 979 'currentText' => __( 'Today' ), 980 'monthNames' => array_values( $wp_locale->month ), 981 'monthNamesShort' => array_values( $wp_locale->month_abbrev ), 982 'nextText' => __( 'Next' ), 983 'prevText' => __( 'Previous' ), 984 'dayNames' => array_values( $wp_locale->weekday ), 985 'dayNamesShort' => array_values( $wp_locale->weekday_abbrev ), 986 'dayNamesMin' => array_values( $wp_locale->weekday_initial ), 987 'dateFormat' => $datepicker_date_format, 988 'firstDay' => absint( get_option( 'start_of_week' ) ), 989 'isRTL' => $wp_locale->is_rtl(), 978 'closeText' => __( 'Close' ), 979 'currentText' => __( 'Today' ), 980 'monthNames' => array_values( $wp_locale->month ), 981 'monthNamesShort' => array_values( $wp_locale->month_abbrev ), 982 'nextText' => __( 'Next' ), 983 'prevText' => __( 'Previous' ), 984 'dayNames' => array_values( $wp_locale->weekday ), 985 'dayNamesShort' => array_values( $wp_locale->weekday_abbrev ), 986 'dayNamesMin' => array_values( $wp_locale->weekday_initial ), 987 'dateFormat' => $datepicker_date_format, 988 'firstDay' => absint( get_option( 'start_of_week' ) ), 989 'isRTL' => $wp_locale->is_rtl(), 990 'weekHeader' => $wp_locale->jquery_ui_i18n['datepicker']['week_header'], 991 'yearSuffix' => $wp_locale->jquery_ui_i18n['datepicker']['year_suffix'], 992 'showMonthAfterYear' => ( 'monthyear' != $wp_locale->jquery_ui_i18n['datepicker']['header_order'] ), 990 993 ) ); 991 994 992 995 wp_add_inline_script( 'jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({$datepicker_defaults});});" );