15 * |
15 * |
16 * @package WordPress |
16 * @package WordPress |
17 */ |
17 */ |
18 |
18 |
19 /** WordPress Dependency Class */ |
19 /** WordPress Dependency Class */ |
20 require( ABSPATH . WPINC . '/class-wp-dependency.php' ); |
20 require ABSPATH . WPINC . '/class-wp-dependency.php'; |
21 |
21 |
22 /** WordPress Dependencies Class */ |
22 /** WordPress Dependencies Class */ |
23 require( ABSPATH . WPINC . '/class.wp-dependencies.php' ); |
23 require ABSPATH . WPINC . '/class.wp-dependencies.php'; |
24 |
24 |
25 /** WordPress Scripts Class */ |
25 /** WordPress Scripts Class */ |
26 require( ABSPATH . WPINC . '/class.wp-scripts.php' ); |
26 require ABSPATH . WPINC . '/class.wp-scripts.php'; |
27 |
27 |
28 /** WordPress Scripts Functions */ |
28 /** WordPress Scripts Functions */ |
29 require( ABSPATH . WPINC . '/functions.wp-scripts.php' ); |
29 require ABSPATH . WPINC . '/functions.wp-scripts.php'; |
30 |
30 |
31 /** WordPress Styles Class */ |
31 /** WordPress Styles Class */ |
32 require( ABSPATH . WPINC . '/class.wp-styles.php' ); |
32 require ABSPATH . WPINC . '/class.wp-styles.php'; |
33 |
33 |
34 /** WordPress Styles Functions */ |
34 /** WordPress Styles Functions */ |
35 require( ABSPATH . WPINC . '/functions.wp-styles.php' ); |
35 require ABSPATH . WPINC . '/functions.wp-styles.php'; |
36 |
36 |
37 /** |
37 /** |
38 * Registers TinyMCE scripts. |
38 * Registers TinyMCE scripts. |
39 * |
39 * |
40 * @since 5.0.0 |
40 * @since 5.0.0 |
41 * |
41 * |
42 * @param WP_Scripts $scripts WP_Scripts object. |
42 * @param WP_Scripts $scripts WP_Scripts object. |
43 */ |
43 * @param bool $force_uncompressed Whether to forcibly prevent gzip compression. Default false. |
44 function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) { |
44 */ |
|
45 function wp_register_tinymce_scripts( $scripts, $force_uncompressed = false ) { |
45 global $tinymce_version, $concatenate_scripts, $compress_scripts; |
46 global $tinymce_version, $concatenate_scripts, $compress_scripts; |
46 $suffix = wp_scripts_get_suffix(); |
47 $suffix = wp_scripts_get_suffix(); |
47 $dev_suffix = wp_scripts_get_suffix( 'dev' ); |
48 $dev_suffix = wp_scripts_get_suffix( 'dev' ); |
48 |
49 |
49 script_concat_settings(); |
50 script_concat_settings(); |
50 |
51 |
51 $compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) |
52 $compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) |
52 && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $force_uncompressed; |
53 && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $force_uncompressed; |
53 |
54 |
54 // Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) or |
55 // Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) |
55 // tinymce.min.js (when SCRIPT_DEBUG is true). |
56 // or tinymce.min.js (when SCRIPT_DEBUG is true). |
56 if ( $compressed ) { |
57 if ( $compressed ) { |
57 $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.js', array(), $tinymce_version ); |
58 $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.js', array(), $tinymce_version ); |
58 } else { |
59 } else { |
59 $scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$dev_suffix.js", array(), $tinymce_version ); |
60 $scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$dev_suffix.js", array(), $tinymce_version ); |
60 $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$dev_suffix.js", array( 'wp-tinymce-root' ), $tinymce_version ); |
61 $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$dev_suffix.js", array( 'wp-tinymce-root' ), $tinymce_version ); |
218 * |
227 * |
219 * @since 5.0.0 |
228 * @since 5.0.0 |
220 * |
229 * |
221 * @param WP_Scripts $scripts WP_Scripts object. |
230 * @param WP_Scripts $scripts WP_Scripts object. |
222 */ |
231 */ |
223 function wp_default_packages_scripts( &$scripts ) { |
232 function wp_default_packages_scripts( $scripts ) { |
224 $suffix = wp_scripts_get_suffix(); |
233 $suffix = wp_scripts_get_suffix(); |
225 |
234 |
226 $packages_versions = array( |
235 // Expects multidimensional array like: |
227 'a11y' => '2.2.0', |
236 // 'a11y.js' => array('dependencies' => array(...), 'version' => '...'), |
228 'annotations' => '1.2.3', |
237 // 'annotations.js' => array('dependencies' => array(...), 'version' => '...'), |
229 'api-fetch' => '3.1.2', |
238 // 'api-fetch.js' => array(... |
230 'autop' => '2.0.0', |
239 $assets = include ABSPATH . WPINC . '/assets/script-loader-packages.php'; |
231 'blob' => '2.3.0', |
240 |
232 'block-editor' => '2.0.3', |
241 foreach ( $assets as $package_name => $package_data ) { |
233 'block-library' => '2.4.6', |
242 $basename = basename( $package_name, '.js' ); |
234 'block-serialization-default-parser' => '3.1.0', |
243 $handle = 'wp-' . $basename; |
235 'blocks' => '6.2.5', |
244 $path = "/wp-includes/js/dist/{$basename}{$suffix}.js"; |
236 'components' => '7.3.2', |
245 |
237 'compose' => '3.2.0', |
246 if ( ! empty( $package_data['dependencies'] ) ) { |
238 'core-data' => '2.2.2', |
247 $dependencies = $package_data['dependencies']; |
239 'data' => '4.4.0', |
248 } else { |
240 'date' => '3.2.0', |
249 $dependencies = array(); |
241 'deprecated' => '2.2.0', |
250 } |
242 'dom' => '2.2.5', |
251 |
243 'dom-ready' => '2.2.0', |
252 // Add dependencies that cannot be detected and generated by build tools. |
244 'edit-post' => '3.3.6', |
253 switch ( $handle ) { |
245 'editor' => '9.2.6', |
254 case 'wp-block-library': |
246 'element' => '2.3.0', |
255 array_push( $dependencies, 'editor' ); |
247 'escape-html' => '1.2.0', |
256 break; |
248 'format-library' => '1.4.6', |
257 case 'wp-edit-post': |
249 'hooks' => '2.2.0', |
258 array_push( $dependencies, 'media-models', 'media-views', 'postbox', 'wp-dom-ready' ); |
250 'html-entities' => '2.2.0', |
259 break; |
251 'i18n' => '3.3.0', |
260 } |
252 'is-shallow-equal' => '1.2.0', |
261 |
253 'keycodes' => '2.2.0', |
262 $scripts->add( $handle, $path, $dependencies, $package_data['version'], 1 ); |
254 'list-reusable-blocks' => '1.3.5', |
263 |
255 'notices' => '1.3.0', |
264 if ( in_array( 'wp-i18n', $dependencies, true ) ) { |
256 'nux' => '3.2.5', |
|
257 'plugins' => '2.2.0', |
|
258 'priority-queue' => '1.1.0', |
|
259 'redux-routine' => '3.2.0', |
|
260 'rich-text' => '3.2.3', |
|
261 'shortcode' => '2.2.0', |
|
262 'token-list' => '1.2.0', |
|
263 'url' => '2.5.0', |
|
264 'viewport' => '2.3.0', |
|
265 'wordcount' => '2.2.0', |
|
266 ); |
|
267 |
|
268 $packages_dependencies = array( |
|
269 'api-fetch' => array( 'wp-polyfill', 'wp-i18n', 'wp-url' ), |
|
270 'a11y' => array( 'wp-dom-ready', 'wp-polyfill' ), |
|
271 'annotations' => array( |
|
272 'wp-data', |
|
273 'wp-hooks', |
|
274 'wp-i18n', |
|
275 'wp-polyfill', |
|
276 'wp-rich-text', |
|
277 ), |
|
278 'autop' => array( 'wp-polyfill' ), |
|
279 'blob' => array( 'wp-polyfill' ), |
|
280 'blocks' => array( |
|
281 'wp-autop', |
|
282 'wp-blob', |
|
283 'wp-block-serialization-default-parser', |
|
284 'wp-data', |
|
285 'wp-dom', |
|
286 'wp-element', |
|
287 'wp-hooks', |
|
288 'wp-html-entities', |
|
289 'wp-i18n', |
|
290 'wp-is-shallow-equal', |
|
291 'wp-polyfill', |
|
292 'wp-shortcode', |
|
293 'lodash', |
|
294 ), |
|
295 'block-library' => array( |
|
296 'editor', |
|
297 'lodash', |
|
298 'wp-api-fetch', |
|
299 'wp-autop', |
|
300 'wp-blob', |
|
301 'wp-block-editor', |
|
302 'wp-blocks', |
|
303 'wp-components', |
|
304 'wp-compose', |
|
305 'wp-core-data', |
|
306 'wp-data', |
|
307 'wp-date', |
|
308 'wp-editor', |
|
309 'wp-element', |
|
310 'wp-html-entities', |
|
311 'wp-i18n', |
|
312 'wp-keycodes', |
|
313 'wp-polyfill', |
|
314 'wp-url', |
|
315 'wp-viewport', |
|
316 'wp-rich-text', |
|
317 ), |
|
318 'block-serialization-default-parser' => array(), |
|
319 'block-editor' => array( |
|
320 'lodash', |
|
321 'wp-a11y', |
|
322 'wp-blob', |
|
323 'wp-blocks', |
|
324 'wp-components', |
|
325 'wp-compose', |
|
326 'wp-core-data', |
|
327 'wp-data', |
|
328 'wp-dom', |
|
329 'wp-element', |
|
330 'wp-hooks', |
|
331 'wp-html-entities', |
|
332 'wp-i18n', |
|
333 'wp-is-shallow-equal', |
|
334 'wp-keycodes', |
|
335 'wp-rich-text', |
|
336 'wp-token-list', |
|
337 'wp-url', |
|
338 'wp-viewport', |
|
339 'wp-wordcount', |
|
340 ), |
|
341 'components' => array( |
|
342 'lodash', |
|
343 'moment', |
|
344 'wp-a11y', |
|
345 'wp-api-fetch', |
|
346 'wp-compose', |
|
347 'wp-dom', |
|
348 'wp-element', |
|
349 'wp-hooks', |
|
350 'wp-html-entities', |
|
351 'wp-i18n', |
|
352 'wp-is-shallow-equal', |
|
353 'wp-keycodes', |
|
354 'wp-polyfill', |
|
355 'wp-rich-text', |
|
356 'wp-url', |
|
357 ), |
|
358 'compose' => array( |
|
359 'lodash', |
|
360 'wp-element', |
|
361 'wp-is-shallow-equal', |
|
362 'wp-polyfill', |
|
363 ), |
|
364 'core-data' => array( |
|
365 'lodash', |
|
366 'wp-api-fetch', |
|
367 'wp-data', |
|
368 'wp-deprecated', |
|
369 'wp-polyfill', |
|
370 'wp-url', |
|
371 ), |
|
372 'data' => array( |
|
373 'lodash', |
|
374 'wp-compose', |
|
375 'wp-element', |
|
376 'wp-is-shallow-equal', |
|
377 'wp-polyfill', |
|
378 'wp-priority-queue', |
|
379 'wp-redux-routine', |
|
380 ), |
|
381 'date' => array( 'moment', 'wp-polyfill' ), |
|
382 'deprecated' => array( 'wp-polyfill', 'wp-hooks' ), |
|
383 'dom' => array( 'lodash', 'wp-polyfill' ), |
|
384 'dom-ready' => array( 'wp-polyfill' ), |
|
385 'edit-post' => array( |
|
386 'jquery', |
|
387 'lodash', |
|
388 'postbox', |
|
389 'media-models', |
|
390 'media-views', |
|
391 'wp-a11y', |
|
392 'wp-api-fetch', |
|
393 'wp-block-editor', |
|
394 'wp-block-library', |
|
395 'wp-blocks', |
|
396 'wp-components', |
|
397 'wp-compose', |
|
398 'wp-core-data', |
|
399 'wp-data', |
|
400 'wp-dom-ready', |
|
401 'wp-editor', |
|
402 'wp-element', |
|
403 'wp-embed', |
|
404 'wp-i18n', |
|
405 'wp-keycodes', |
|
406 'wp-notices', |
|
407 'wp-nux', |
|
408 'wp-plugins', |
|
409 'wp-polyfill', |
|
410 'wp-url', |
|
411 'wp-viewport', |
|
412 ), |
|
413 'editor' => array( |
|
414 'lodash', |
|
415 'wp-api-fetch', |
|
416 'wp-blob', |
|
417 'wp-block-editor', |
|
418 'wp-blocks', |
|
419 'wp-components', |
|
420 'wp-compose', |
|
421 'wp-core-data', |
|
422 'wp-data', |
|
423 'wp-date', |
|
424 'wp-deprecated', |
|
425 'wp-element', |
|
426 'wp-hooks', |
|
427 'wp-html-entities', |
|
428 'wp-i18n', |
|
429 'wp-keycodes', |
|
430 'wp-notices', |
|
431 'wp-nux', |
|
432 'wp-polyfill', |
|
433 'wp-url', |
|
434 'wp-viewport', |
|
435 'wp-wordcount', |
|
436 ), |
|
437 'element' => array( 'wp-polyfill', 'react', 'react-dom', 'lodash', 'wp-escape-html' ), |
|
438 'escape-html' => array( 'wp-polyfill' ), |
|
439 'format-library' => array( |
|
440 'wp-block-editor', |
|
441 'wp-components', |
|
442 'wp-editor', |
|
443 'wp-element', |
|
444 'wp-i18n', |
|
445 'wp-keycodes', |
|
446 'wp-polyfill', |
|
447 'wp-rich-text', |
|
448 'wp-url', |
|
449 ), |
|
450 'hooks' => array( 'wp-polyfill' ), |
|
451 'html-entities' => array( 'wp-polyfill' ), |
|
452 'i18n' => array( 'wp-polyfill' ), |
|
453 'is-shallow-equal' => array( 'wp-polyfill' ), |
|
454 'keycodes' => array( 'lodash', 'wp-polyfill', 'wp-i18n' ), |
|
455 'list-reusable-blocks' => array( |
|
456 'lodash', |
|
457 'wp-api-fetch', |
|
458 'wp-components', |
|
459 'wp-compose', |
|
460 'wp-element', |
|
461 'wp-i18n', |
|
462 'wp-polyfill', |
|
463 ), |
|
464 'notices' => array( |
|
465 'lodash', |
|
466 'wp-a11y', |
|
467 'wp-data', |
|
468 'wp-polyfill', |
|
469 ), |
|
470 'nux' => array( |
|
471 'wp-element', |
|
472 'lodash', |
|
473 'wp-components', |
|
474 'wp-compose', |
|
475 'wp-data', |
|
476 'wp-i18n', |
|
477 'wp-polyfill', |
|
478 'lodash', |
|
479 ), |
|
480 'plugins' => array( 'lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill' ), |
|
481 'priority-queue' => array(), |
|
482 'redux-routine' => array( 'wp-polyfill' ), |
|
483 'rich-text' => array( |
|
484 'lodash', |
|
485 'wp-data', |
|
486 'wp-escape-html', |
|
487 'wp-polyfill', |
|
488 ), |
|
489 'shortcode' => array( 'wp-polyfill', 'lodash' ), |
|
490 'token-list' => array( 'lodash', 'wp-polyfill' ), |
|
491 'url' => array( 'wp-polyfill' ), |
|
492 'viewport' => array( 'wp-polyfill', 'wp-element', 'wp-data', 'wp-compose', 'lodash' ), |
|
493 'wordcount' => array( 'wp-polyfill' ), |
|
494 ); |
|
495 |
|
496 $package_translations = array( |
|
497 'api-fetch', |
|
498 'blocks', |
|
499 'block-editor', |
|
500 'block-library', |
|
501 'components', |
|
502 'edit-post', |
|
503 'editor', |
|
504 'format-library', |
|
505 'keycodes', |
|
506 'list-reusable-blocks', |
|
507 'nux', |
|
508 ); |
|
509 |
|
510 foreach ( $packages_dependencies as $package => $dependencies ) { |
|
511 $handle = 'wp-' . $package; |
|
512 $path = "/wp-includes/js/dist/$package$suffix.js"; |
|
513 $version = $packages_versions[ $package ]; |
|
514 |
|
515 $scripts->add( $handle, $path, $dependencies, $version, 1 ); |
|
516 |
|
517 if ( in_array( $package, $package_translations, true ) ) { |
|
518 $scripts->set_translations( $handle ); |
265 $scripts->set_translations( $handle ); |
519 } |
266 } |
520 } |
267 } |
521 } |
268 } |
522 |
269 |
1008 $scripts->add( 'scriptaculous-slider', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js', array( 'scriptaculous-effects' ), '1.9.0' ); |
713 $scripts->add( 'scriptaculous-slider', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js', array( 'scriptaculous-effects' ), '1.9.0' ); |
1009 $scripts->add( 'scriptaculous-sound', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js', array( 'scriptaculous-root' ), '1.9.0' ); |
714 $scripts->add( 'scriptaculous-sound', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js', array( 'scriptaculous-root' ), '1.9.0' ); |
1010 $scripts->add( 'scriptaculous-controls', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js', array( 'scriptaculous-root' ), '1.9.0' ); |
715 $scripts->add( 'scriptaculous-controls', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js', array( 'scriptaculous-root' ), '1.9.0' ); |
1011 $scripts->add( 'scriptaculous', false, array( 'scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls' ) ); |
716 $scripts->add( 'scriptaculous', false, array( 'scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls' ) ); |
1012 |
717 |
1013 // not used in core, replaced by Jcrop.js |
718 // Not used in core, replaced by Jcrop.js. |
1014 $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array( 'scriptaculous-dragdrop' ) ); |
719 $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array( 'scriptaculous-dragdrop' ) ); |
1015 |
720 |
1016 // jQuery |
721 // jQuery. |
1017 $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4-wp' ); |
722 $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.12.4-wp' ); |
1018 $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4-wp' ); |
723 $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4-wp' ); |
1019 $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' ); |
724 $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' ); |
1020 |
725 |
1021 // full jQuery UI |
726 // Full jQuery UI. |
1022 $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); |
727 $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); |
1023 $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); |
728 $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); |
1024 |
729 |
1025 $scripts->add( 'jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$dev_suffix.js", array( 'jquery-effects-core' ), '1.11.4', 1 ); |
730 $scripts->add( 'jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$dev_suffix.js", array( 'jquery-effects-core' ), '1.11.4', 1 ); |
1026 $scripts->add( 'jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$dev_suffix.js", array( 'jquery-effects-core' ), '1.11.4', 1 ); |
731 $scripts->add( 'jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$dev_suffix.js", array( 'jquery-effects-core' ), '1.11.4', 1 ); |
1057 $scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array( 'jquery-ui-button' ), '1.11.4', 1 ); |
762 $scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array( 'jquery-ui-button' ), '1.11.4', 1 ); |
1058 $scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.11.4', 1 ); |
763 $scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.11.4', 1 ); |
1059 $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 ); |
764 $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 ); |
1060 $scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); |
765 $scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); |
1061 |
766 |
1062 // Strings for 'jquery-ui-autocomplete' live region messages |
767 // Strings for 'jquery-ui-autocomplete' live region messages. |
1063 did_action( 'init' ) && $scripts->localize( |
768 did_action( 'init' ) && $scripts->localize( |
1064 'jquery-ui-autocomplete', |
769 'jquery-ui-autocomplete', |
1065 'uiAutocompleteL10n', |
770 'uiAutocompleteL10n', |
1066 array( |
771 array( |
1067 'noResults' => __( 'No results found.' ), |
772 'noResults' => __( 'No results found.' ), |
1068 /* translators: Number of results found when using jQuery UI Autocomplete */ |
773 /* translators: Number of results found when using jQuery UI Autocomplete. */ |
1069 'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ), |
774 'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ), |
1070 /* translators: %d: Number of results found when using jQuery UI Autocomplete */ |
775 /* translators: %d: Number of results found when using jQuery UI Autocomplete. */ |
1071 'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ), |
776 'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ), |
1072 'itemSelected' => __( 'Item selected.' ), |
777 'itemSelected' => __( 'Item selected.' ), |
1073 ) |
778 ) |
1074 ); |
779 ); |
1075 |
780 |
1076 // deprecated, not used in core, most functionality is included in jQuery 1.3 |
781 // Deprecated, not used in core, most functionality is included in jQuery 1.3. |
1077 $scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array( 'jquery' ), '4.2.1', 1 ); |
782 $scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array( 'jquery' ), '4.2.1', 1 ); |
1078 |
783 |
1079 // jQuery plugins |
784 // jQuery plugins. |
1080 $scripts->add( 'jquery-color', '/wp-includes/js/jquery/jquery.color.min.js', array( 'jquery' ), '2.1.1', 1 ); |
785 $scripts->add( 'jquery-color', '/wp-includes/js/jquery/jquery.color.min.js', array( 'jquery' ), '2.1.2', 1 ); |
1081 $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array( 'jquery' ), '20m', 1 ); |
786 $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array( 'jquery' ), '20m', 1 ); |
1082 $scripts->add( 'jquery-query', '/wp-includes/js/jquery/jquery.query.js', array( 'jquery' ), '2.1.7', 1 ); |
787 $scripts->add( 'jquery-query', '/wp-includes/js/jquery/jquery.query.js', array( 'jquery' ), '2.1.7', 1 ); |
1083 $scripts->add( 'jquery-serialize-object', '/wp-includes/js/jquery/jquery.serialize-object.js', array( 'jquery' ), '0.2', 1 ); |
788 $scripts->add( 'jquery-serialize-object', '/wp-includes/js/jquery/jquery.serialize-object.js', array( 'jquery' ), '0.2', 1 ); |
1084 $scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array( 'jquery' ), '0.0.2m', 1 ); |
789 $scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array( 'jquery' ), '0.0.2m', 1 ); |
1085 $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array( 'jquery', 'jquery-hotkeys' ), false, 1 ); |
790 $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array( 'jquery', 'jquery-hotkeys' ), false, 1 ); |
1114 $scripts->add( 'swfobject', '/wp-includes/js/swfobject.js', array(), '2.2-20120417' ); |
819 $scripts->add( 'swfobject', '/wp-includes/js/swfobject.js', array(), '2.2-20120417' ); |
1115 |
820 |
1116 // Error messages for Plupload. |
821 // Error messages for Plupload. |
1117 $uploader_l10n = array( |
822 $uploader_l10n = array( |
1118 'queue_limit_exceeded' => __( 'You have attempted to queue too many files.' ), |
823 'queue_limit_exceeded' => __( 'You have attempted to queue too many files.' ), |
|
824 /* translators: %s: File name. */ |
1119 'file_exceeds_size_limit' => __( '%s exceeds the maximum upload size for this site.' ), |
825 'file_exceeds_size_limit' => __( '%s exceeds the maximum upload size for this site.' ), |
1120 'zero_byte_file' => __( 'This file is empty. Please try another.' ), |
826 'zero_byte_file' => __( 'This file is empty. Please try another.' ), |
1121 'invalid_filetype' => __( 'Sorry, this file type is not permitted for security reasons.' ), |
827 'invalid_filetype' => __( 'Sorry, this file type is not permitted for security reasons.' ), |
1122 'not_an_image' => __( 'This file is not an image. Please try another.' ), |
828 'not_an_image' => __( 'This file is not an image. Please try another.' ), |
1123 'image_memory_exceeded' => __( 'Memory exceeded. Please try another smaller file.' ), |
829 'image_memory_exceeded' => __( 'Memory exceeded. Please try another smaller file.' ), |
1124 'image_dimensions_exceeded' => __( 'This is larger than the maximum size. Please try another.' ), |
830 'image_dimensions_exceeded' => __( 'This is larger than the maximum size. Please try another.' ), |
1125 'default_error' => __( 'An error occurred in the upload. Please try again later.' ), |
831 'default_error' => __( 'An error occurred in the upload. Please try again later.' ), |
1126 'missing_upload_url' => __( 'There was a configuration error. Please contact the server administrator.' ), |
832 'missing_upload_url' => __( 'There was a configuration error. Please contact the server administrator.' ), |
1127 'upload_limit_exceeded' => __( 'You may only upload 1 file.' ), |
833 'upload_limit_exceeded' => __( 'You may only upload 1 file.' ), |
1128 'http_error' => __( 'HTTP error.' ), |
834 'http_error' => __( 'Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.' ), |
|
835 'http_error_image' => __( 'Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels.' ), |
1129 'upload_failed' => __( 'Upload failed.' ), |
836 'upload_failed' => __( 'Upload failed.' ), |
1130 /* translators: 1: Opening link tag, 2: Closing link tag */ |
837 /* translators: 1: Opening link tag, 2: Closing link tag. */ |
1131 'big_upload_failed' => __( 'Please try uploading this file with the %1$sbrowser uploader%2$s.' ), |
838 'big_upload_failed' => __( 'Please try uploading this file with the %1$sbrowser uploader%2$s.' ), |
|
839 /* translators: %s: File name. */ |
1132 'big_upload_queued' => __( '%s exceeds the maximum upload size for the multi-file uploader when used in your browser.' ), |
840 'big_upload_queued' => __( '%s exceeds the maximum upload size for the multi-file uploader when used in your browser.' ), |
1133 'io_error' => __( 'IO error.' ), |
841 'io_error' => __( 'IO error.' ), |
1134 'security_error' => __( 'Security error.' ), |
842 'security_error' => __( 'Security error.' ), |
1135 'file_cancelled' => __( 'File canceled.' ), |
843 'file_cancelled' => __( 'File canceled.' ), |
1136 'upload_stopped' => __( 'Upload stopped.' ), |
844 'upload_stopped' => __( 'Upload stopped.' ), |
1137 'dismiss' => __( 'Dismiss' ), |
845 'dismiss' => __( 'Dismiss' ), |
1138 'crunching' => __( 'Crunching…' ), |
846 'crunching' => __( 'Crunching…' ), |
1139 'deleted' => __( 'moved to the trash.' ), |
847 'deleted' => __( 'moved to the Trash.' ), |
|
848 /* translators: %s: File name. */ |
1140 'error_uploading' => __( '“%s” has failed to upload.' ), |
849 'error_uploading' => __( '“%s” has failed to upload.' ), |
|
850 'unsupported_image' => __( 'This image cannot be displayed in a web browser. For best results convert it to JPEG before uploading.' ), |
1141 ); |
851 ); |
1142 |
852 |
1143 $scripts->add( 'moxiejs', "/wp-includes/js/plupload/moxie$suffix.js", array(), '1.3.5' ); |
853 $scripts->add( 'moxiejs', "/wp-includes/js/plupload/moxie$suffix.js", array(), '1.3.5' ); |
1144 $scripts->add( 'plupload', "/wp-includes/js/plupload/plupload$suffix.js", array( 'moxiejs' ), '2.1.9' ); |
854 $scripts->add( 'plupload', "/wp-includes/js/plupload/plupload$suffix.js", array( 'moxiejs' ), '2.1.9' ); |
1145 // Back compat handles: |
855 // Back compat handles: |
1182 |
892 |
1183 $scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'wp-backbone', 'jquery-ui-slider', 'hoverIntent' ), false, 1 ); |
893 $scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'wp-backbone', 'jquery-ui-slider', 'hoverIntent' ), false, 1 ); |
1184 |
894 |
1185 $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array( 'jquery' ), false, 1 ); |
895 $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array( 'jquery' ), false, 1 ); |
1186 |
896 |
1187 $scripts->add( 'mediaelement', false, array( 'jquery', 'mediaelement-core', 'mediaelement-migrate' ), '4.2.6-78496d1' ); |
897 $scripts->add( 'mediaelement', false, array( 'jquery', 'mediaelement-core', 'mediaelement-migrate' ), '4.2.13-9993131', 1 ); |
1188 $scripts->add( 'mediaelement-core', "/wp-includes/js/mediaelement/mediaelement-and-player$suffix.js", array(), '4.2.6-78496d1', 1 ); |
898 $scripts->add( 'mediaelement-core', "/wp-includes/js/mediaelement/mediaelement-and-player$suffix.js", array(), '4.2.13-9993131', 1 ); |
1189 $scripts->add( 'mediaelement-migrate', "/wp-includes/js/mediaelement/mediaelement-migrate$suffix.js", array(), false, 1 ); |
899 $scripts->add( 'mediaelement-migrate', "/wp-includes/js/mediaelement/mediaelement-migrate$suffix.js", array(), false, 1 ); |
1190 |
900 |
1191 did_action( 'init' ) && $scripts->add_inline_script( |
901 did_action( 'init' ) && $scripts->add_inline_script( |
1192 'mediaelement-core', |
902 'mediaelement-core', |
1193 sprintf( |
903 sprintf( |
1194 'var mejsL10n = %s;', |
904 'var mejsL10n = %s;', |
1195 wp_json_encode( |
905 wp_json_encode( |
1196 array( |
906 array( |
1197 'language' => strtolower( strtok( determine_locale(), '_-' ) ), |
907 'language' => strtolower( strtok( determine_locale(), '_-' ) ), |
1198 'strings' => array( |
908 'strings' => array( |
|
909 'mejs.download-file' => __( 'Download File' ), |
1199 'mejs.install-flash' => __( 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/' ), |
910 'mejs.install-flash' => __( 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/' ), |
1200 'mejs.fullscreen-off' => __( 'Turn off Fullscreen' ), |
|
1201 'mejs.fullscreen-on' => __( 'Go Fullscreen' ), |
|
1202 'mejs.download-video' => __( 'Download Video' ), |
|
1203 'mejs.fullscreen' => __( 'Fullscreen' ), |
911 'mejs.fullscreen' => __( 'Fullscreen' ), |
1204 'mejs.time-jump-forward' => array( __( 'Jump forward 1 second' ), __( 'Jump forward %1 seconds' ) ), |
|
1205 'mejs.loop' => __( 'Toggle Loop' ), |
|
1206 'mejs.play' => __( 'Play' ), |
912 'mejs.play' => __( 'Play' ), |
1207 'mejs.pause' => __( 'Pause' ), |
913 'mejs.pause' => __( 'Pause' ), |
1208 'mejs.close' => __( 'Close' ), |
|
1209 'mejs.time-slider' => __( 'Time Slider' ), |
914 'mejs.time-slider' => __( 'Time Slider' ), |
1210 'mejs.time-help-text' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ), |
915 'mejs.time-help-text' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ), |
1211 'mejs.time-skip-back' => array( __( 'Skip back 1 second' ), __( 'Skip back %1 seconds' ) ), |
916 'mejs.live-broadcast' => __( 'Live Broadcast' ), |
1212 'mejs.captions-subtitles' => __( 'Captions/Subtitles' ), |
|
1213 'mejs.captions-chapters' => __( 'Chapters' ), |
|
1214 'mejs.none' => __( 'None' ), |
|
1215 'mejs.mute-toggle' => __( 'Mute Toggle' ), |
|
1216 'mejs.volume-help-text' => __( 'Use Up/Down Arrow keys to increase or decrease volume.' ), |
917 'mejs.volume-help-text' => __( 'Use Up/Down Arrow keys to increase or decrease volume.' ), |
1217 'mejs.unmute' => __( 'Unmute' ), |
918 'mejs.unmute' => __( 'Unmute' ), |
1218 'mejs.mute' => __( 'Mute' ), |
919 'mejs.mute' => __( 'Mute' ), |
1219 'mejs.volume-slider' => __( 'Volume Slider' ), |
920 'mejs.volume-slider' => __( 'Volume Slider' ), |
1220 'mejs.video-player' => __( 'Video Player' ), |
921 'mejs.video-player' => __( 'Video Player' ), |
1221 'mejs.audio-player' => __( 'Audio Player' ), |
922 'mejs.audio-player' => __( 'Audio Player' ), |
1222 'mejs.ad-skip' => __( 'Skip ad' ), |
923 'mejs.captions-subtitles' => __( 'Captions/Subtitles' ), |
1223 'mejs.ad-skip-info' => array( __( 'Skip in 1 second' ), __( 'Skip in %1 seconds' ) ), |
924 'mejs.captions-chapters' => __( 'Chapters' ), |
1224 'mejs.source-chooser' => __( 'Source Chooser' ), |
925 'mejs.none' => __( 'None' ), |
1225 'mejs.stop' => __( 'Stop' ), |
|
1226 'mejs.speed-rate' => __( 'Speed Rate' ), |
|
1227 'mejs.live-broadcast' => __( 'Live Broadcast' ), |
|
1228 'mejs.afrikaans' => __( 'Afrikaans' ), |
926 'mejs.afrikaans' => __( 'Afrikaans' ), |
1229 'mejs.albanian' => __( 'Albanian' ), |
927 'mejs.albanian' => __( 'Albanian' ), |
1230 'mejs.arabic' => __( 'Arabic' ), |
928 'mejs.arabic' => __( 'Arabic' ), |
1231 'mejs.belarusian' => __( 'Belarusian' ), |
929 'mejs.belarusian' => __( 'Belarusian' ), |
1232 'mejs.bulgarian' => __( 'Bulgarian' ), |
930 'mejs.bulgarian' => __( 'Bulgarian' ), |
1313 $scripts->add( 'jshint', '/wp-includes/js/codemirror/fakejshint.js', array( 'esprima' ), '2.9.5' ); |
1011 $scripts->add( 'jshint', '/wp-includes/js/codemirror/fakejshint.js', array( 'esprima' ), '2.9.5' ); |
1314 $scripts->add( 'jsonlint', '/wp-includes/js/codemirror/jsonlint.js', array(), '1.6.2' ); |
1012 $scripts->add( 'jsonlint', '/wp-includes/js/codemirror/jsonlint.js', array(), '1.6.2' ); |
1315 $scripts->add( 'htmlhint', '/wp-includes/js/codemirror/htmlhint.js', array(), '0.9.14-xwp' ); |
1013 $scripts->add( 'htmlhint', '/wp-includes/js/codemirror/htmlhint.js', array(), '0.9.14-xwp' ); |
1316 $scripts->add( 'htmlhint-kses', '/wp-includes/js/codemirror/htmlhint-kses.js', array( 'htmlhint' ) ); |
1014 $scripts->add( 'htmlhint-kses', '/wp-includes/js/codemirror/htmlhint-kses.js', array( 'htmlhint' ) ); |
1317 $scripts->add( 'code-editor', "/wp-admin/js/code-editor$suffix.js", array( 'jquery', 'wp-codemirror', 'underscore' ) ); |
1015 $scripts->add( 'code-editor', "/wp-admin/js/code-editor$suffix.js", array( 'jquery', 'wp-codemirror', 'underscore' ) ); |
1318 $scripts->add( 'wp-theme-plugin-editor', "/wp-admin/js/theme-plugin-editor$suffix.js", array( 'wp-util', 'wp-sanitize', 'jquery', 'jquery-ui-core', 'wp-a11y', 'underscore' ) ); |
1016 $scripts->add( 'wp-theme-plugin-editor', "/wp-admin/js/theme-plugin-editor$suffix.js", array( 'common', 'wp-util', 'wp-sanitize', 'jquery', 'jquery-ui-core', 'wp-a11y', 'underscore' ) ); |
1319 did_action( 'init' ) && $scripts->add_inline_script( |
1017 $scripts->set_translations( 'wp-theme-plugin-editor' ); |
1320 'wp-theme-plugin-editor', |
|
1321 sprintf( |
|
1322 'wp.themePluginEditor.l10n = %s;', |
|
1323 wp_json_encode( |
|
1324 array( |
|
1325 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
|
1326 'saveError' => __( 'Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.' ), |
|
1327 'lintError' => array( |
|
1328 /* translators: %d: error count */ |
|
1329 'singular' => _n( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.', 1 ), |
|
1330 /* translators: %d: error count */ |
|
1331 'plural' => _n( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. |
|
1332 ), |
|
1333 ) |
|
1334 ) |
|
1335 ) |
|
1336 ); |
|
1337 |
1018 |
1338 $scripts->add( 'wp-playlist', "/wp-includes/js/mediaelement/wp-playlist$suffix.js", array( 'wp-util', 'backbone', 'mediaelement' ), false, 1 ); |
1019 $scripts->add( 'wp-playlist', "/wp-includes/js/mediaelement/wp-playlist$suffix.js", array( 'wp-util', 'backbone', 'mediaelement' ), false, 1 ); |
1339 |
1020 |
1340 $scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' ); |
1021 $scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' ); |
1341 did_action( 'init' ) && $scripts->localize( |
1022 did_action( 'init' ) && $scripts->localize( |
1391 'save' => __( 'Add Link' ), |
1061 'save' => __( 'Add Link' ), |
1392 'noTitle' => __( '(no title)' ), |
1062 'noTitle' => __( '(no title)' ), |
1393 'noMatchesFound' => __( 'No results found.' ), |
1063 'noMatchesFound' => __( 'No results found.' ), |
1394 'linkSelected' => __( 'Link selected.' ), |
1064 'linkSelected' => __( 'Link selected.' ), |
1395 'linkInserted' => __( 'Link inserted.' ), |
1065 'linkInserted' => __( 'Link inserted.' ), |
|
1066 /* translators: Minimum input length in characters to start searching posts in the "Insert/edit link" modal. */ |
|
1067 'minInputLength' => (int) _x( '3', 'minimum input length for searching post links' ), |
1396 ) |
1068 ) |
1397 ); |
1069 ); |
1398 |
1070 |
1399 $scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 ); |
1071 $scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 ); |
1400 |
1072 |
1401 $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1 ); |
1073 $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1 ); |
1402 |
1074 |
1403 $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode' ), false, 1 ); |
1075 $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode' ), false, 1 ); |
1404 |
1076 |
1405 $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array( 'jquery' ), '1.8.1', 1 ); |
1077 $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array( 'jquery' ), '1.8.1', 1 ); |
|
1078 |
|
1079 // JS-only version of hoverintent (no dependencies). |
|
1080 $scripts->add( 'hoverintent-js', '/wp-includes/js/hoverintent-js.min.js', array(), '2.2.1', 1 ); |
1406 |
1081 |
1407 $scripts->add( 'customize-base', "/wp-includes/js/customize-base$suffix.js", array( 'jquery', 'json2', 'underscore' ), false, 1 ); |
1082 $scripts->add( 'customize-base', "/wp-includes/js/customize-base$suffix.js", array( 'jquery', 'json2', 'underscore' ), false, 1 ); |
1408 $scripts->add( 'customize-loader', "/wp-includes/js/customize-loader$suffix.js", array( 'customize-base' ), false, 1 ); |
1083 $scripts->add( 'customize-loader', "/wp-includes/js/customize-loader$suffix.js", array( 'customize-base' ), false, 1 ); |
1409 $scripts->add( 'customize-preview', "/wp-includes/js/customize-preview$suffix.js", array( 'wp-a11y', 'customize-base' ), false, 1 ); |
1084 $scripts->add( 'customize-preview', "/wp-includes/js/customize-preview$suffix.js", array( 'wp-a11y', 'customize-base' ), false, 1 ); |
1410 $scripts->add( 'customize-models', '/wp-includes/js/customize-models.js', array( 'underscore', 'backbone' ), false, 1 ); |
1085 $scripts->add( 'customize-models', '/wp-includes/js/customize-models.js', array( 'underscore', 'backbone' ), false, 1 ); |
1442 'untitledBlogName' => __( '(Untitled)' ), |
1117 'untitledBlogName' => __( '(Untitled)' ), |
1443 'unknownRequestFail' => __( 'Looks like something’s gone wrong. Wait a couple seconds, and then try again.' ), |
1118 'unknownRequestFail' => __( 'Looks like something’s gone wrong. Wait a couple seconds, and then try again.' ), |
1444 'themeDownloading' => __( 'Downloading your new theme…' ), |
1119 'themeDownloading' => __( 'Downloading your new theme…' ), |
1445 'themePreviewWait' => __( 'Setting up your live preview. This may take a bit.' ), |
1120 'themePreviewWait' => __( 'Setting up your live preview. This may take a bit.' ), |
1446 'revertingChanges' => __( 'Reverting unpublished changes…' ), |
1121 'revertingChanges' => __( 'Reverting unpublished changes…' ), |
1447 'trashConfirm' => __( 'Are you sure you’d like to discard your unpublished changes?' ), |
1122 'trashConfirm' => __( 'Are you sure you want to discard your unpublished changes?' ), |
1448 /* translators: %s: Display name of the user who has taken over the changeset in customizer. */ |
1123 /* translators: %s: Display name of the user who has taken over the changeset in customizer. */ |
1449 'takenOverMessage' => __( '%s has taken over and is currently customizing.' ), |
1124 'takenOverMessage' => __( '%s has taken over and is currently customizing.' ), |
1450 /* translators: %s: URL to the Customizer to load the autosaved version */ |
1125 /* translators: %s: URL to the Customizer to load the autosaved version. */ |
1451 'autosaveNotice' => __( 'There is a more recent autosave of your changes than the one you are previewing. <a href="%s">Restore the autosave</a>' ), |
1126 'autosaveNotice' => __( 'There is a more recent autosave of your changes than the one you are previewing. <a href="%s">Restore the autosave</a>' ), |
1452 'videoHeaderNotice' => __( 'This theme doesn’t support video headers on this page. Navigate to the front page or another page that supports video headers.' ), |
1127 'videoHeaderNotice' => __( 'This theme doesn’t support video headers on this page. Navigate to the front page or another page that supports video headers.' ), |
1453 // Used for overriding the file types allowed in plupload. |
1128 // Used for overriding the file types allowed in Plupload. |
1454 'allowedFiles' => __( 'Allowed Files' ), |
1129 'allowedFiles' => __( 'Allowed Files' ), |
1455 'customCssError' => array( |
1130 'customCssError' => array( |
1456 /* translators: %d: error count */ |
1131 /* translators: %d: Error count. */ |
1457 'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ), |
1132 'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ), |
1458 /* translators: %d: error count */ |
1133 /* translators: %d: Error count. */ |
1459 'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. |
1134 'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), |
|
1135 // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. |
1460 ), |
1136 ), |
1461 'pageOnFrontError' => __( 'Homepage and posts page must be different.' ), |
1137 'pageOnFrontError' => __( 'Homepage and posts page must be different.' ), |
1462 'saveBlockedError' => array( |
1138 'saveBlockedError' => array( |
1463 /* translators: %s: number of invalid settings */ |
1139 /* translators: %s: Number of invalid settings. */ |
1464 'singular' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 1 ), |
1140 'singular' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 1 ), |
1465 /* translators: %s: number of invalid settings */ |
1141 /* translators: %s: Number of invalid settings. */ |
1466 'plural' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. |
1142 'plural' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 2 ), |
|
1143 // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. |
1467 ), |
1144 ), |
1468 'scheduleDescription' => __( 'Schedule your customization changes to publish ("go live") at a future date.' ), |
1145 'scheduleDescription' => __( 'Schedule your customization changes to publish ("go live") at a future date.' ), |
1469 'themePreviewUnavailable' => __( 'Sorry, you can’t preview new themes when you have changes scheduled or saved as a draft. Please publish your changes, or wait until they publish to preview new themes.' ), |
1146 'themePreviewUnavailable' => __( 'Sorry, you can’t preview new themes when you have changes scheduled or saved as a draft. Please publish your changes, or wait until they publish to preview new themes.' ), |
1470 'themeInstallUnavailable' => sprintf( |
1147 'themeInstallUnavailable' => sprintf( |
1471 /* translators: %s: URL to Add Themes admin screen */ |
1148 /* translators: %s: URL to Add Themes admin screen. */ |
1472 __( 'You won’t be able to install new themes from here yet since your install requires SFTP credentials. For now, please <a href="%s">add themes in the admin</a>.' ), |
1149 __( 'You won’t be able to install new themes from here yet since your install requires SFTP credentials. For now, please <a href="%s">add themes in the admin</a>.' ), |
1473 esc_url( admin_url( 'theme-install.php' ) ) |
1150 esc_url( admin_url( 'theme-install.php' ) ) |
1474 ), |
1151 ), |
1475 'publishSettings' => __( 'Publish Settings' ), |
1152 'publishSettings' => __( 'Publish Settings' ), |
1476 'invalidDate' => __( 'Invalid date.' ), |
1153 'invalidDate' => __( 'Invalid date.' ), |
1477 'invalidValue' => __( 'Invalid value.' ), |
1154 'invalidValue' => __( 'Invalid value.' ), |
1504 |
1181 |
1505 $scripts->add( 'wp-embed', "/wp-includes/js/wp-embed$suffix.js" ); |
1182 $scripts->add( 'wp-embed', "/wp-includes/js/wp-embed$suffix.js" ); |
1506 |
1183 |
1507 // To enqueue media-views or media-editor, call wp_enqueue_media(). |
1184 // To enqueue media-views or media-editor, call wp_enqueue_media(). |
1508 // Both rely on numerous settings, styles, and templates to operate correctly. |
1185 // Both rely on numerous settings, styles, and templates to operate correctly. |
1509 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request' ), false, 1 ); |
1186 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y', 'clipboard' ), false, 1 ); |
|
1187 $scripts->set_translations( 'media-views' ); |
|
1188 |
1510 $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 ); |
1189 $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 ); |
|
1190 $scripts->set_translations( 'media-editor' ); |
1511 $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 ); |
1191 $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 ); |
1512 $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 ); |
1192 $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 ); |
1513 |
1193 |
1514 $scripts->add( 'wp-api', "/wp-includes/js/wp-api$suffix.js", array( 'jquery', 'backbone', 'underscore', 'wp-api-request' ), false, 1 ); |
1194 $scripts->add( 'wp-api', "/wp-includes/js/wp-api$suffix.js", array( 'jquery', 'backbone', 'underscore', 'wp-api-request' ), false, 1 ); |
1515 |
1195 |
1516 if ( is_admin() ) { |
1196 if ( is_admin() ) { |
1517 $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 ); |
1197 $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 ); |
1518 did_action( 'init' ) && $scripts->localize( |
1198 $scripts->set_translations( 'admin-tags' ); |
1519 'admin-tags', |
|
1520 'tagsl10n', |
|
1521 array( |
|
1522 'noPerm' => __( 'Sorry, you are not allowed to do that.' ), |
|
1523 'broken' => __( 'Something went wrong.' ), |
|
1524 ) |
|
1525 ); |
|
1526 |
1199 |
1527 $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array( 'wp-lists', 'quicktags', 'jquery-query' ), false, 1 ); |
1200 $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array( 'wp-lists', 'quicktags', 'jquery-query' ), false, 1 ); |
|
1201 $scripts->set_translations( 'admin-comments' ); |
1528 did_action( 'init' ) && $scripts->localize( |
1202 did_action( 'init' ) && $scripts->localize( |
1529 'admin-comments', |
1203 'admin-comments', |
1530 'adminCommentsL10n', |
1204 'adminCommentsSettings', |
1531 array( |
1205 array( |
1532 'hotkeys_highlight_first' => isset( $_GET['hotkeys_highlight_first'] ), |
1206 'hotkeys_highlight_first' => isset( $_GET['hotkeys_highlight_first'] ), |
1533 'hotkeys_highlight_last' => isset( $_GET['hotkeys_highlight_last'] ), |
1207 'hotkeys_highlight_last' => isset( $_GET['hotkeys_highlight_last'] ), |
1534 'replyApprove' => __( 'Approve and Reply' ), |
|
1535 'reply' => __( 'Reply' ), |
|
1536 'warnQuickEdit' => __( "Are you sure you want to edit this comment?\nThe changes you made will be lost." ), |
|
1537 'warnCommentChanges' => __( "Are you sure you want to do this?\nThe comment changes you made will be lost." ), |
|
1538 'docTitleComments' => __( 'Comments' ), |
|
1539 /* translators: %s: comments count */ |
|
1540 'docTitleCommentsCount' => __( 'Comments (%s)' ), |
|
1541 ) |
1208 ) |
1542 ); |
1209 ); |
1543 |
1210 |
1544 $scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array( 'jquery' ), false, 1 ); |
1211 $scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array( 'jquery' ), false, 1 ); |
1545 did_action( 'init' ) && $scripts->localize( |
1212 |
1546 'xfn', |
1213 $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array( 'jquery-ui-sortable', 'wp-a11y' ), false, 1 ); |
1547 'privacyToolsL10n', |
1214 $scripts->set_translations( 'postbox' ); |
1548 array( |
|
1549 'noDataFound' => __( 'No personal data was found for this user.' ), |
|
1550 'foundAndRemoved' => __( 'All of the personal data found for this user was erased.' ), |
|
1551 'noneRemoved' => __( 'Personal data was found for this user but was not erased.' ), |
|
1552 'someNotRemoved' => __( 'Personal data was found for this user but some of the personal data found was not erased.' ), |
|
1553 'removalError' => __( 'An error occurred while attempting to find and erase personal data.' ), |
|
1554 'noExportFile' => __( 'No personal data export file was generated.' ), |
|
1555 'exportError' => __( 'An error occurred while attempting to export personal data.' ), |
|
1556 ) |
|
1557 ); |
|
1558 |
|
1559 $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array( 'jquery-ui-sortable' ), false, 1 ); |
|
1560 did_action( 'init' ) && $scripts->localize( |
|
1561 'postbox', |
|
1562 'postBoxL10n', |
|
1563 array( |
|
1564 'postBoxEmptyString' => __( 'Drag boxes here' ), |
|
1565 ) |
|
1566 ); |
|
1567 |
1215 |
1568 $scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'tags-suggest' ), false, 1 ); |
1216 $scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'tags-suggest' ), false, 1 ); |
|
1217 $scripts->set_translations( 'tags-box' ); |
1569 |
1218 |
1570 $scripts->add( 'tags-suggest', "/wp-admin/js/tags-suggest$suffix.js", array( 'jquery-ui-autocomplete', 'wp-a11y' ), false, 1 ); |
1219 $scripts->add( 'tags-suggest', "/wp-admin/js/tags-suggest$suffix.js", array( 'jquery-ui-autocomplete', 'wp-a11y' ), false, 1 ); |
1571 did_action( 'init' ) && $scripts->localize( |
1220 $scripts->set_translations( 'tags-suggest' ); |
1572 'tags-suggest', |
1221 |
1573 'tagsSuggestL10n', |
1222 $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y', 'wp-sanitize', 'clipboard' ), false, 1 ); |
1574 array( |
1223 $scripts->set_translations( 'post' ); |
1575 'tagDelimiter' => _x( ',', 'tag delimiter' ), |
|
1576 'removeTerm' => __( 'Remove term:' ), |
|
1577 'termSelected' => __( 'Term selected.' ), |
|
1578 'termAdded' => __( 'Term added.' ), |
|
1579 'termRemoved' => __( 'Term removed.' ), |
|
1580 ) |
|
1581 ); |
|
1582 |
|
1583 $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y', 'wp-sanitize' ), false, 1 ); |
|
1584 did_action( 'init' ) && $scripts->localize( |
|
1585 'post', |
|
1586 'postL10n', |
|
1587 array( |
|
1588 'ok' => __( 'OK' ), |
|
1589 'cancel' => __( 'Cancel' ), |
|
1590 'publishOn' => __( 'Publish on:' ), |
|
1591 'publishOnFuture' => __( 'Schedule for:' ), |
|
1592 'publishOnPast' => __( 'Published on:' ), |
|
1593 /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ |
|
1594 'dateFormat' => __( '%1$s %2$s, %3$s @ %4$s:%5$s' ), |
|
1595 'showcomm' => __( 'Show more comments' ), |
|
1596 'endcomm' => __( 'No more comments found.' ), |
|
1597 'publish' => __( 'Publish' ), |
|
1598 'schedule' => _x( 'Schedule', 'post action/button label' ), |
|
1599 'update' => __( 'Update' ), |
|
1600 'savePending' => __( 'Save as Pending' ), |
|
1601 'saveDraft' => __( 'Save Draft' ), |
|
1602 'private' => __( 'Private' ), |
|
1603 'public' => __( 'Public' ), |
|
1604 'publicSticky' => __( 'Public, Sticky' ), |
|
1605 'password' => __( 'Password Protected' ), |
|
1606 'privatelyPublished' => __( 'Privately Published' ), |
|
1607 'published' => __( 'Published' ), |
|
1608 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
|
1609 'savingText' => __( 'Saving Draft…' ), |
|
1610 'permalinkSaved' => __( 'Permalink saved' ), |
|
1611 ) |
|
1612 ); |
|
1613 |
1224 |
1614 $scripts->add( 'editor-expand', "/wp-admin/js/editor-expand$suffix.js", array( 'jquery', 'underscore' ), false, 1 ); |
1225 $scripts->add( 'editor-expand', "/wp-admin/js/editor-expand$suffix.js", array( 'jquery', 'underscore' ), false, 1 ); |
1615 |
1226 |
1616 $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 ); |
1227 $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 ); |
1617 |
1228 |
1618 $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ) ); |
1229 $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ), false, 1 ); |
1619 $scripts->add_data( 'comment', 'group', 1 ); |
1230 $scripts->set_translations( 'comment' ); |
1620 did_action( 'init' ) && $scripts->localize( |
|
1621 'comment', |
|
1622 'commentL10n', |
|
1623 array( |
|
1624 'submittedOn' => __( 'Submitted on:' ), |
|
1625 /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ |
|
1626 'dateFormat' => __( '%1$s %2$s, %3$s @ %4$s:%5$s' ), |
|
1627 ) |
|
1628 ); |
|
1629 |
1231 |
1630 $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) ); |
1232 $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) ); |
1631 |
1233 |
1632 $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 ); |
1234 $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-a11y' ), false, 1 ); |
1633 did_action( 'init' ) && $scripts->add_inline_script( |
1235 $scripts->set_translations( 'admin-widgets' ); |
1634 'admin-widgets', |
|
1635 sprintf( |
|
1636 'wpWidgets.l10n = %s;', |
|
1637 wp_json_encode( |
|
1638 array( |
|
1639 'save' => __( 'Save' ), |
|
1640 'saved' => __( 'Saved' ), |
|
1641 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
|
1642 ) |
|
1643 ) |
|
1644 ) |
|
1645 ); |
|
1646 |
1236 |
1647 $scripts->add( 'media-widgets', "/wp-admin/js/widgets/media-widgets$suffix.js", array( 'jquery', 'media-models', 'media-views', 'wp-api-request' ) ); |
1237 $scripts->add( 'media-widgets', "/wp-admin/js/widgets/media-widgets$suffix.js", array( 'jquery', 'media-models', 'media-views', 'wp-api-request' ) ); |
1648 $scripts->add_inline_script( 'media-widgets', 'wp.mediaWidgets.init();', 'after' ); |
1238 $scripts->add_inline_script( 'media-widgets', 'wp.mediaWidgets.init();', 'after' ); |
1649 |
1239 |
1650 $scripts->add( 'media-audio-widget', "/wp-admin/js/widgets/media-audio-widget$suffix.js", array( 'media-widgets', 'media-audiovideo' ) ); |
1240 $scripts->add( 'media-audio-widget', "/wp-admin/js/widgets/media-audio-widget$suffix.js", array( 'media-widgets', 'media-audiovideo' ) ); |
1655 $scripts->add( 'custom-html-widgets', "/wp-admin/js/widgets/custom-html-widgets$suffix.js", array( 'jquery', 'backbone', 'wp-util', 'jquery-ui-core', 'wp-a11y' ) ); |
1245 $scripts->add( 'custom-html-widgets', "/wp-admin/js/widgets/custom-html-widgets$suffix.js", array( 'jquery', 'backbone', 'wp-util', 'jquery-ui-core', 'wp-a11y' ) ); |
1656 |
1246 |
1657 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y', 'customize-base' ), false, 1 ); |
1247 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y', 'customize-base' ), false, 1 ); |
1658 |
1248 |
1659 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'tags-suggest', 'wp-a11y' ), false, 1 ); |
1249 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'tags-suggest', 'wp-a11y' ), false, 1 ); |
1660 did_action( 'init' ) && $scripts->localize( |
1250 $scripts->set_translations( 'inline-edit-post' ); |
1661 'inline-edit-post', |
|
1662 'inlineEditL10n', |
|
1663 array( |
|
1664 'error' => __( 'Error while saving the changes.' ), |
|
1665 'ntdeltitle' => __( 'Remove From Bulk Edit' ), |
|
1666 'notitle' => __( '(no title)' ), |
|
1667 'comma' => trim( _x( ',', 'tag delimiter' ) ), |
|
1668 'saved' => __( 'Changes saved.' ), |
|
1669 ) |
|
1670 ); |
|
1671 |
1251 |
1672 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); |
1252 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); |
1673 did_action( 'init' ) && $scripts->localize( |
1253 $scripts->set_translations( 'inline-edit-tax' ); |
1674 'inline-edit-tax', |
|
1675 'inlineEditL10n', |
|
1676 array( |
|
1677 'error' => __( 'Error while saving the changes.' ), |
|
1678 'saved' => __( 'Changes saved.' ), |
|
1679 ) |
|
1680 ); |
|
1681 |
1254 |
1682 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 ); |
1255 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 ); |
1683 did_action( 'init' ) && $scripts->localize( |
1256 $scripts->set_translations( 'plugin-install' ); |
1684 'plugin-install', |
1257 |
1685 'plugininstallL10n', |
1258 $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); |
1686 array( |
|
1687 'plugin_information' => __( 'Plugin:' ), |
|
1688 'plugin_modal_label' => __( 'Plugin details' ), |
|
1689 'ays' => __( 'Are you sure you want to install this plugin?' ), |
|
1690 ) |
|
1691 ); |
|
1692 |
|
1693 $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y', 'wp-i18n' ), false, 1 ); |
|
1694 $scripts->set_translations( 'site-health' ); |
1259 $scripts->set_translations( 'site-health' ); |
1695 |
1260 |
1696 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y', 'wp-sanitize' ), false, 1 ); |
1261 $scripts->add( 'privacy-tools', "/wp-admin/js/privacy-tools$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); |
|
1262 $scripts->set_translations( 'privacy-tools' ); |
|
1263 |
|
1264 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'common', 'jquery', 'wp-util', 'wp-a11y', 'wp-sanitize' ), false, 1 ); |
|
1265 $scripts->set_translations( 'updates' ); |
1697 did_action( 'init' ) && $scripts->localize( |
1266 did_action( 'init' ) && $scripts->localize( |
1698 'updates', |
1267 'updates', |
1699 '_wpUpdatesSettings', |
1268 '_wpUpdatesSettings', |
1700 array( |
1269 array( |
1701 'ajax_nonce' => wp_create_nonce( 'updates' ), |
1270 'ajax_nonce' => wp_create_nonce( 'updates' ), |
1702 'l10n' => array( |
|
1703 /* translators: %s: Search string */ |
|
1704 'searchResults' => __( 'Search results for “%s”' ), |
|
1705 'searchResultsLabel' => __( 'Search Results' ), |
|
1706 'noPlugins' => __( 'You do not appear to have any plugins available at this time.' ), |
|
1707 'noItemsSelected' => __( 'Please select at least one item to perform this action on.' ), |
|
1708 'updating' => __( 'Updating...' ), // No ellipsis. |
|
1709 'pluginUpdated' => _x( 'Updated!', 'plugin' ), |
|
1710 'themeUpdated' => _x( 'Updated!', 'theme' ), |
|
1711 'update' => __( 'Update' ), |
|
1712 'updateNow' => __( 'Update Now' ), |
|
1713 /* translators: %s: Plugin name and version */ |
|
1714 'pluginUpdateNowLabel' => _x( 'Update %s now', 'plugin' ), |
|
1715 'updateFailedShort' => __( 'Update Failed!' ), |
|
1716 /* translators: %s: Error string for a failed update */ |
|
1717 'updateFailed' => __( 'Update Failed: %s' ), |
|
1718 /* translators: %s: Plugin name and version */ |
|
1719 'pluginUpdatingLabel' => _x( 'Updating %s...', 'plugin' ), // No ellipsis. |
|
1720 /* translators: %s: Plugin name and version */ |
|
1721 'pluginUpdatedLabel' => _x( '%s updated!', 'plugin' ), |
|
1722 /* translators: %s: Plugin name and version */ |
|
1723 'pluginUpdateFailedLabel' => _x( '%s update failed', 'plugin' ), |
|
1724 /* translators: Accessibility text */ |
|
1725 'updatingMsg' => __( 'Updating... please wait.' ), // No ellipsis. |
|
1726 /* translators: Accessibility text */ |
|
1727 'updatedMsg' => __( 'Update completed successfully.' ), |
|
1728 /* translators: Accessibility text */ |
|
1729 'updateCancel' => __( 'Update canceled.' ), |
|
1730 'beforeunload' => __( 'Updates may not complete if you navigate away from this page.' ), |
|
1731 'installNow' => __( 'Install Now' ), |
|
1732 /* translators: %s: Plugin name */ |
|
1733 'pluginInstallNowLabel' => _x( 'Install %s now', 'plugin' ), |
|
1734 'installing' => __( 'Installing...' ), |
|
1735 'pluginInstalled' => _x( 'Installed!', 'plugin' ), |
|
1736 'themeInstalled' => _x( 'Installed!', 'theme' ), |
|
1737 'installFailedShort' => __( 'Installation Failed!' ), |
|
1738 /* translators: %s: Error string for a failed installation */ |
|
1739 'installFailed' => __( 'Installation failed: %s' ), |
|
1740 /* translators: %s: Plugin name and version */ |
|
1741 'pluginInstallingLabel' => _x( 'Installing %s...', 'plugin' ), // no ellipsis |
|
1742 /* translators: %s: Theme name and version */ |
|
1743 'themeInstallingLabel' => _x( 'Installing %s...', 'theme' ), // no ellipsis |
|
1744 /* translators: %s: Plugin name and version */ |
|
1745 'pluginInstalledLabel' => _x( '%s installed!', 'plugin' ), |
|
1746 /* translators: %s: Theme name and version */ |
|
1747 'themeInstalledLabel' => _x( '%s installed!', 'theme' ), |
|
1748 /* translators: %s: Plugin name and version */ |
|
1749 'pluginInstallFailedLabel' => _x( '%s installation failed', 'plugin' ), |
|
1750 /* translators: %s: Theme name and version */ |
|
1751 'themeInstallFailedLabel' => _x( '%s installation failed', 'theme' ), |
|
1752 'installingMsg' => __( 'Installing... please wait.' ), |
|
1753 'installedMsg' => __( 'Installation completed successfully.' ), |
|
1754 /* translators: %s: Activation URL */ |
|
1755 'importerInstalledMsg' => __( 'Importer installed successfully. <a href="%s">Run importer</a>' ), |
|
1756 /* translators: %s: Theme name */ |
|
1757 'aysDelete' => __( 'Are you sure you want to delete %s?' ), |
|
1758 /* translators: %s: Plugin name */ |
|
1759 'aysDeleteUninstall' => __( 'Are you sure you want to delete %s and its data?' ), |
|
1760 'aysBulkDelete' => __( 'Are you sure you want to delete the selected plugins and their data?' ), |
|
1761 'aysBulkDeleteThemes' => __( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' ), |
|
1762 'deleting' => __( 'Deleting...' ), |
|
1763 /* translators: %s: Error string for a failed deletion */ |
|
1764 'deleteFailed' => __( 'Deletion failed: %s' ), |
|
1765 'pluginDeleted' => _x( 'Deleted!', 'plugin' ), |
|
1766 'themeDeleted' => _x( 'Deleted!', 'theme' ), |
|
1767 'livePreview' => __( 'Live Preview' ), |
|
1768 'activatePlugin' => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ), |
|
1769 'activateTheme' => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ), |
|
1770 /* translators: %s: Plugin name */ |
|
1771 'activatePluginLabel' => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ), |
|
1772 /* translators: %s: Theme name */ |
|
1773 'activateThemeLabel' => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ), |
|
1774 'activateImporter' => __( 'Run Importer' ), |
|
1775 /* translators: %s: Importer name */ |
|
1776 'activateImporterLabel' => __( 'Run %s' ), |
|
1777 'unknownError' => __( 'Something went wrong.' ), |
|
1778 'connectionError' => __( 'Connection lost or the server is busy. Please try again later.' ), |
|
1779 'nonceError' => __( 'An error has occurred. Please reload the page and try again.' ), |
|
1780 'pluginsFound' => __( 'Number of plugins found: %d' ), |
|
1781 'noPluginsFound' => __( 'No plugins found. Try a different search.' ), |
|
1782 ), |
|
1783 ) |
1271 ) |
1784 ); |
1272 ); |
1785 |
1273 |
1786 $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array( 'jquery' ), '1.2' ); |
1274 $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array( 'jquery' ), '1.2' ); |
1787 |
1275 |
1788 $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 ); |
1276 $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 ); |
1789 $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 ); |
1277 $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 ); |
1790 did_action( 'init' ) && $scripts->localize( |
1278 $scripts->set_translations( 'wp-color-picker' ); |
1791 'wp-color-picker', |
|
1792 'wpColorPickerL10n', |
|
1793 array( |
|
1794 'clear' => __( 'Clear' ), |
|
1795 'clearAriaLabel' => __( 'Clear color' ), |
|
1796 'defaultString' => __( 'Default' ), |
|
1797 'defaultAriaLabel' => __( 'Select default color' ), |
|
1798 'pick' => __( 'Select Color' ), |
|
1799 'defaultLabel' => __( 'Color value' ), |
|
1800 ) |
|
1801 ); |
|
1802 |
1279 |
1803 $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox', 'wp-util', 'wp-a11y' ), false, 1 ); |
1280 $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox', 'wp-util', 'wp-a11y' ), false, 1 ); |
1804 |
1281 |
1805 $scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" ); |
1282 $scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" ); |
1806 |
1283 |
1807 $scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 ); |
1284 $scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 ); |
1808 $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 ); |
1285 $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 ); |
1809 did_action( 'init' ) && $scripts->localize( |
1286 $scripts->set_translations( 'media' ); |
1810 'media', |
1287 |
1811 'attachMediaBoxL10n', |
1288 $scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array( 'jquery', 'jquery-ui-core', 'json2', 'imgareaselect', 'wp-a11y' ), false, 1 ); |
1812 array( |
1289 $scripts->set_translations( 'image-edit' ); |
1813 'error' => __( 'An error has occurred. Please reload the page and try again.' ), |
|
1814 ) |
|
1815 ); |
|
1816 |
|
1817 $scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array( 'jquery', 'json2', 'imgareaselect' ), false, 1 ); |
|
1818 did_action( 'init' ) && $scripts->localize( |
|
1819 'image-edit', |
|
1820 'imageEditL10n', |
|
1821 array( |
|
1822 'error' => __( 'Could not load the preview image. Please reload the page and try again.' ), |
|
1823 ) |
|
1824 ); |
|
1825 |
1290 |
1826 $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), false, 1 ); |
1291 $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), false, 1 ); |
1827 did_action( 'init' ) && $scripts->localize( |
1292 $scripts->set_translations( 'set-post-thumbnail' ); |
1828 'set-post-thumbnail', |
|
1829 'setPostThumbnailL10n', |
|
1830 array( |
|
1831 'setThumbnail' => __( 'Use as featured image' ), |
|
1832 'saving' => __( 'Saving...' ), // no ellipsis |
|
1833 'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ), |
|
1834 'done' => __( 'Done' ), |
|
1835 ) |
|
1836 ); |
|
1837 |
1293 |
1838 /* |
1294 /* |
1839 * Navigation Menus: Adding underscore as a dependency to utilize _.debounce |
1295 * Navigation Menus: Adding underscore as a dependency to utilize _.debounce |
1840 * see https://core.trac.wordpress.org/ticket/42321 |
1296 * see https://core.trac.wordpress.org/ticket/42321 |
1841 */ |
1297 */ |
1842 $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox', 'json2', 'underscore' ) ); |
1298 $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox', 'json2', 'underscore' ) ); |
1843 did_action( 'init' ) && $scripts->localize( |
1299 $scripts->set_translations( 'nav-menu' ); |
1844 'nav-menu', |
|
1845 'navMenuL10n', |
|
1846 array( |
|
1847 'noResultsFound' => __( 'No results found.' ), |
|
1848 'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ), |
|
1849 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
|
1850 'untitled' => _x( '(no label)', 'missing menu item navigation label' ), |
|
1851 ) |
|
1852 ); |
|
1853 |
1300 |
1854 $scripts->add( 'custom-header', '/wp-admin/js/custom-header.js', array( 'jquery-masonry' ), false, 1 ); |
1301 $scripts->add( 'custom-header', '/wp-admin/js/custom-header.js', array( 'jquery-masonry' ), false, 1 ); |
1855 $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker', 'media-views' ), false, 1 ); |
1302 $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker', 'media-views' ), false, 1 ); |
1856 $scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array( 'jquery' ), false, 1 ); |
1303 $scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array( 'jquery' ), false, 1 ); |
1857 |
1304 |
1892 $styles->default_dirs = array( '/wp-admin/', '/wp-includes/css/' ); |
1342 $styles->default_dirs = array( '/wp-admin/', '/wp-includes/css/' ); |
1893 |
1343 |
1894 // Open Sans is no longer used by core, but may be relied upon by themes and plugins. |
1344 // Open Sans is no longer used by core, but may be relied upon by themes and plugins. |
1895 $open_sans_font_url = ''; |
1345 $open_sans_font_url = ''; |
1896 |
1346 |
1897 /* translators: If there are characters in your language that are not supported |
1347 /* |
|
1348 * translators: If there are characters in your language that are not supported |
1898 * by Open Sans, translate this to 'off'. Do not translate into your own language. |
1349 * by Open Sans, translate this to 'off'. Do not translate into your own language. |
1899 */ |
1350 */ |
1900 if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) { |
1351 if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) { |
1901 $subsets = 'latin,latin-ext'; |
1352 $subsets = 'latin,latin-ext'; |
1902 |
1353 |
1903 /* translators: To add an additional Open Sans character subset specific to your language, |
1354 /* |
|
1355 * translators: To add an additional Open Sans character subset specific to your language, |
1904 * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. |
1356 * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. |
1905 */ |
1357 */ |
1906 $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' ); |
1358 $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' ); |
1907 |
1359 |
1908 if ( 'cyrillic' == $subset ) { |
1360 if ( 'cyrillic' === $subset ) { |
1909 $subsets .= ',cyrillic,cyrillic-ext'; |
1361 $subsets .= ',cyrillic,cyrillic-ext'; |
1910 } elseif ( 'greek' == $subset ) { |
1362 } elseif ( 'greek' === $subset ) { |
1911 $subsets .= ',greek,greek-ext'; |
1363 $subsets .= ',greek,greek-ext'; |
1912 } elseif ( 'vietnamese' == $subset ) { |
1364 } elseif ( 'vietnamese' === $subset ) { |
1913 $subsets .= ',vietnamese'; |
1365 $subsets .= ',vietnamese'; |
1914 } |
1366 } |
1915 |
1367 |
1916 // Hotlink Open Sans, for now |
1368 // Hotlink Open Sans, for now. |
1917 $open_sans_font_url = "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets"; |
1369 $open_sans_font_url = "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets&display=fallback"; |
1918 } |
1370 } |
1919 |
1371 |
1920 // Register a stylesheet for the selected admin color scheme. |
1372 // Register a stylesheet for the selected admin color scheme. |
1921 $styles->add( 'colors', true, array( 'wp-admin', 'buttons' ) ); |
1373 $styles->add( 'colors', true, array( 'wp-admin', 'buttons' ) ); |
1922 |
1374 |
1923 $suffix = SCRIPT_DEBUG ? '' : '.min'; |
1375 $suffix = SCRIPT_DEBUG ? '' : '.min'; |
1924 |
1376 |
1925 // Admin CSS |
1377 // Admin CSS. |
1926 $styles->add( 'common', "/wp-admin/css/common$suffix.css" ); |
1378 $styles->add( 'common', "/wp-admin/css/common$suffix.css" ); |
1927 $styles->add( 'forms', "/wp-admin/css/forms$suffix.css" ); |
1379 $styles->add( 'forms', "/wp-admin/css/forms$suffix.css" ); |
1928 $styles->add( 'admin-menu', "/wp-admin/css/admin-menu$suffix.css" ); |
1380 $styles->add( 'admin-menu', "/wp-admin/css/admin-menu$suffix.css" ); |
1929 $styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css" ); |
1381 $styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css" ); |
1930 $styles->add( 'list-tables', "/wp-admin/css/list-tables$suffix.css" ); |
1382 $styles->add( 'list-tables', "/wp-admin/css/list-tables$suffix.css" ); |
1943 $styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) ); |
1395 $styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) ); |
1944 |
1396 |
1945 $styles->add( 'login', "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) ); |
1397 $styles->add( 'login', "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) ); |
1946 $styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) ); |
1398 $styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) ); |
1947 $styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" ); |
1399 $styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" ); |
1948 $styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) ); |
1400 $styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'imgareaselect' ) ); |
1949 $styles->add( 'customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) ); |
1401 $styles->add( 'customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) ); |
1950 $styles->add( 'customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array( 'wp-admin', 'colors' ) ); |
1402 $styles->add( 'customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array( 'wp-admin', 'colors' ) ); |
1951 |
1403 |
1952 $styles->add( 'ie', "/wp-admin/css/ie$suffix.css" ); |
1404 // Common dependencies. |
1953 $styles->add_data( 'ie', 'conditional', 'lte IE 7' ); |
|
1954 |
|
1955 // Common dependencies |
|
1956 $styles->add( 'buttons', "/wp-includes/css/buttons$suffix.css" ); |
1405 $styles->add( 'buttons', "/wp-includes/css/buttons$suffix.css" ); |
1957 $styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" ); |
1406 $styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" ); |
1958 |
1407 |
1959 // Includes CSS |
1408 // Includes CSS. |
1960 $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array( 'dashicons' ) ); |
1409 $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array( 'dashicons' ) ); |
1961 $styles->add( 'wp-auth-check', "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) ); |
1410 $styles->add( 'wp-auth-check', "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) ); |
1962 $styles->add( 'editor-buttons', "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) ); |
1411 $styles->add( 'editor-buttons', "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) ); |
1963 $styles->add( 'media-views', "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) ); |
1412 $styles->add( 'media-views', "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) ); |
1964 $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) ); |
1413 $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) ); |
1965 $styles->add( 'customize-preview', "/wp-includes/css/customize-preview$suffix.css", array( 'dashicons' ) ); |
1414 $styles->add( 'customize-preview', "/wp-includes/css/customize-preview$suffix.css", array( 'dashicons' ) ); |
1966 $styles->add( 'wp-embed-template-ie', "/wp-includes/css/wp-embed-template-ie$suffix.css" ); |
1415 $styles->add( 'wp-embed-template-ie', "/wp-includes/css/wp-embed-template-ie$suffix.css" ); |
1967 $styles->add_data( 'wp-embed-template-ie', 'conditional', 'lte IE 8' ); |
1416 $styles->add_data( 'wp-embed-template-ie', 'conditional', 'lte IE 8' ); |
1968 |
1417 |
1969 // External libraries and friends |
1418 // External libraries and friends. |
1970 $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' ); |
1419 $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' ); |
1971 $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array( 'dashicons' ) ); |
1420 $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array( 'dashicons' ) ); |
1972 $styles->add( 'mediaelement', '/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css', array(), '4.2.6-78496d1' ); |
1421 $styles->add( 'mediaelement', '/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css', array(), '4.2.13-9993131' ); |
1973 $styles->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.css", array( 'mediaelement' ) ); |
1422 $styles->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.css", array( 'mediaelement' ) ); |
1974 $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array( 'dashicons' ) ); |
1423 $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array( 'dashicons' ) ); |
1975 $styles->add( 'wp-codemirror', '/wp-includes/js/codemirror/codemirror.min.css', array(), '5.29.1-alpha-ee20357' ); |
1424 $styles->add( 'wp-codemirror', '/wp-includes/js/codemirror/codemirror.min.css', array(), '5.29.1-alpha-ee20357' ); |
1976 |
1425 |
1977 // Deprecated CSS |
1426 // Deprecated CSS. |
1978 $styles->add( 'deprecated-media', "/wp-admin/css/deprecated-media$suffix.css" ); |
1427 $styles->add( 'deprecated-media', "/wp-admin/css/deprecated-media$suffix.css" ); |
1979 $styles->add( 'farbtastic', "/wp-admin/css/farbtastic$suffix.css", array(), '1.3u1' ); |
1428 $styles->add( 'farbtastic', "/wp-admin/css/farbtastic$suffix.css", array(), '1.3u1' ); |
1980 $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.min.css', array(), '0.9.12' ); |
1429 $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.min.css', array(), '0.9.12' ); |
1981 $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle. |
1430 $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle. |
1982 $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6 |
1431 $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6. |
1983 |
1432 |
1984 // Packages styles |
1433 // Packages styles. |
1985 $fonts_url = ''; |
1434 $fonts_url = ''; |
1986 |
1435 |
1987 /* |
1436 /* |
1988 * Translators: Use this to specify the proper Google Font name and variants |
1437 * translators: Use this to specify the proper Google Font name and variants |
1989 * to load that is supported by your language. Do not translate. |
1438 * to load that is supported by your language. Do not translate. |
1990 * Set to 'off' to disable loading. |
1439 * Set to 'off' to disable loading. |
1991 */ |
1440 */ |
1992 $font_family = _x( 'Noto Serif:400,400i,700,700i', 'Google Font Name and Variants' ); |
1441 $font_family = _x( 'Noto Serif:400,400i,700,700i', 'Google Font Name and Variants' ); |
1993 if ( 'off' !== $font_family ) { |
1442 if ( 'off' !== $font_family ) { |