Changeset 44262 for trunk/src/wp-includes/script-loader.php
- Timestamp:
- 12/17/2018 03:35:21 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43891,43903,43919
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/script-loader.php
r44261 r44262 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 79 81 $vendor_scripts = array( 80 'react' ,82 'react' => array( 'wp-polyfill' ), 81 83 'react-dom' => array( 'react' ), 82 84 'moment', … … 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', 114 ), 115 'after' 116 ) 117 ); 118 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 ) 113 144 ) 114 ) 115 ); 116 117 did_action( 'init' ) && $scripts->add_inline_script( 'lodash', 'window.lodash = _.noConflict();' ); 145 ), 146 'after' 147 ); 118 148 } 119 149 … … 184 214 'wp-element', 185 215 'wp-hooks', 216 'wp-html-entities', 186 217 'wp-i18n', 187 218 'wp-is-shallow-equal', … … 202 233 'wp-core-data', 203 234 'wp-data', 235 'wp-date', 204 236 'wp-editor', 205 237 'wp-element', … … 220 252 'wp-api-fetch', 221 253 'wp-compose', 222 'wp-deprecated',223 254 'wp-dom', 224 255 'wp-element', … … 234 265 'compose' => array( 235 266 'lodash', 236 'wp-deprecated',237 267 'wp-element', 238 268 'wp-is-shallow-equal', … … 243 273 'lodash', 244 274 'wp-compose', 245 'wp-deprecated',246 275 'wp-element', 247 276 'wp-is-shallow-equal', … … 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', 349 380 'wp-data', 350 'wp-deprecated',351 381 'wp-i18n', 352 382 'wp-polyfill', … … 357 387 'rich-text' => array( 358 388 'lodash', 359 'wp-blocks',360 389 'wp-data', 361 'wp-deprecated',362 390 'wp-escape-html', 363 391 'wp-polyfill', … … 1853 1881 1854 1882 /* 1855 * Translators: If there are characters in your language that are not supported 1856 * by Noto Serif, translate this to 'off'. Do not translate into your own language. 1883 * Translators: Use this to specify the proper Google Font name and variants 1884 * to load that is supported by your language. Do not translate. 1885 * Set to 'off' to disable loading. 1857 1886 */ 1858 if ( 'off' !== _x( 'on', 'Noto Serif font: on or off' ) ) { 1859 $fonts_url = 'https://fonts.googleapis.com/css?family=Noto+Serif%3A400%2C400i%2C700%2C700i'; 1887 $font_family = _x( 'Noto Serif:400,400i,700,700i', 'Google Font Name and Variants' ); 1888 if ( 'off' !== $font_family ) { 1889 $fonts_url = 'https://fonts.googleapis.com/css?family=' . urlencode( $font_family ); 1860 1890 } 1861 1891 $styles->add( 'wp-editor-font', $fonts_url );
Note: See TracChangeset
for help on using the changeset viewer.