Changeset 43919 for branches/5.0/src/wp-includes/script-loader.php
- Timestamp:
- 11/21/2018 03:08:01 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/script-loader.php
r43914 r43919 75 75 */ 76 76 function wp_default_packages_vendor( &$scripts ) { 77 global $wp_locale; 78 77 79 $dev_suffix = wp_scripts_get_suffix( 'dev' ); 78 80 … … 101 103 102 104 $scripts->add( 'wp-polyfill', null, array( 'wp-polyfill' ) ); 103 did_action( 'init' ) && $scripts->add_ data(105 did_action( 'init' ) && $scripts->add_inline_script( 104 106 'wp-polyfill', 105 'data',106 107 wp_get_script_polyfill( 107 108 $scripts, … … 111 112 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata', 112 113 'Element.prototype.matches && Element.prototype.closest' => 'wp-polyfill-element-closest', 113 ) 114 ), 115 'after' 114 116 ) 115 117 ); 116 118 117 119 did_action( 'init' ) && $scripts->add_inline_script( 'lodash', 'window.lodash = _.noConflict();' ); 120 121 did_action( 'init' ) && $scripts->add_inline_script( 122 'moment', 123 sprintf( 124 "moment.locale( '%s', %s );", 125 get_user_locale(), 126 wp_json_encode( 127 array( 128 'months' => array_values( $wp_locale->month ), 129 'monthsShort' => array_values( $wp_locale->month_abbrev ), 130 'weekdays' => array_values( $wp_locale->weekday ), 131 'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ), 132 'week' => array( 133 'dow' => (int) get_option( 'start_of_week', 0 ), 134 ), 135 'longDateFormat' => array( 136 'LT' => get_option( 'time_format', __( 'g:i a', 'default' ) ), 137 'LTS' => null, 138 'L' => null, 139 'LL' => get_option( 'date_format', __( 'F j, Y', 'default' ) ), 140 'LLL' => __( 'F j, Y g:i a', 'default' ), 141 'LLLL' => null, 142 ), 143 ) 144 ) 145 ), 146 'after' 147 ); 118 148 } 119 149 … … 222 252 'wp-api-fetch', 223 253 'wp-compose', 224 'wp-deprecated',225 254 'wp-dom', 226 255 'wp-element', … … 273 302 'wp-i18n', 274 303 'wp-keycodes', 304 'wp-notices', 275 305 'wp-nux', 276 306 'wp-plugins', … … 345 375 'nux' => array( 346 376 'wp-element', 377 'lodash', 347 378 'wp-components', 348 379 'wp-compose', … … 356 387 'rich-text' => array( 357 388 'lodash', 358 'wp-blocks',359 389 'wp-data', 360 390 'wp-escape-html', … … 1689 1719 1690 1720 /* 1691 * Translators: If there are characters in your language that are not supported 1692 * by Noto Serif, translate this to 'off'. Do not translate into your own language. 1721 * Translators: Use this to specify the proper Google Font name and variants 1722 * to load that is supported by your language. Do not translate. 1723 * Set to 'off' to disable loading. 1693 1724 */ 1694 if ( 'off' !== _x( 'on', 'Noto Serif font: on or off' ) ) { 1695 $fonts_url = 'https://fonts.googleapis.com/css?family=Noto+Serif%3A400%2C400i%2C700%2C700i'; 1725 $font_family = _x( 'Noto Serif:400,400i,700,700i', 'Google Font Name and Variants' ); 1726 if ( 'off' !== $font_family ) { 1727 $fonts_url = 'https://fonts.googleapis.com/css?family=' . urlencode( $font_family ); 1696 1728 } 1697 1729 $styles->add( 'wp-editor-font', $fonts_url );
Note: See TracChangeset
for help on using the changeset viewer.