Changeset 56194 for trunk/src/wp-includes/script-loader.php
- Timestamp:
- 07/10/2023 11:09:16 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r56139 r56194 58 58 && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $force_uncompressed; 59 59 60 // Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) 61 // or tinymce.min.js (when SCRIPT_DEBUG is true). 60 /* 61 * Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) 62 * or tinymce.min.js (when SCRIPT_DEBUG is true). 63 */ 62 64 if ( $compressed ) { 63 65 $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.js', array(), $tinymce_version ); … … 586 588 $tinymce_settings = apply_filters( 'tiny_mce_before_init', $tinymce_settings, 'classic-block' ); 587 589 588 // Do "by hand" translation from PHP array to js object. 589 // Prevents breakage in some custom settings. 590 /* 591 * Do "by hand" translation from PHP array to js object. 592 * Prevents breakage in some custom settings. 593 */ 590 594 $init_obj = ''; 591 595 foreach ( $tinymce_settings as $key => $value ) { … … 826 830 $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array( 'scriptaculous-dragdrop' ) ); 827 831 828 // jQuery. 829 // The unminified jquery.js and jquery-migrate.js are included to facilitate debugging. 832 /* 833 * jQuery. 834 * The unminified jquery.js and jquery-migrate.js are included to facilitate debugging. 835 */ 830 836 $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '3.7.0' ); 831 837 $scripts->add( 'jquery-core', "/wp-includes/js/jquery/jquery$suffix.js", array(), '3.7.0' ); 832 838 $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '3.4.1' ); 833 839 834 // Full jQuery UI. 835 // The build process in 1.12.1 has changed significantly. 836 // In order to keep backwards compatibility, and to keep the optimized loading, 837 // the source files were flattened and included with some modifications for AMD loading. 838 // A notable change is that 'jquery-ui-core' now contains 'jquery-ui-position' and 'jquery-ui-widget'. 840 /* 841 * Full jQuery UI. 842 * The build process in 1.12.1 has changed significantly. 843 * In order to keep backwards compatibility, and to keep the optimized loading, 844 * the source files were flattened and included with some modifications for AMD loading. 845 * A notable change is that 'jquery-ui-core' now contains 'jquery-ui-position' and 'jquery-ui-widget'. 846 */ 839 847 $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$suffix.js", array( 'jquery' ), '1.13.2', 1 ); 840 848 $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$suffix.js", array( 'jquery' ), '1.13.2', 1 ); … … 882 890 $scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$suffix.js", array( 'jquery-ui-mouse' ), '1.13.2', 1 ); 883 891 884 // As of 1.12.1 `jquery-ui-position` and `jquery-ui-widget` are part of `jquery-ui-core`. 885 // Listed here for back-compat. 892 /* 893 * As of 1.12.1 `jquery-ui-position` and `jquery-ui-widget` are part of `jquery-ui-core`. 894 * Listed here for back-compat. 895 */ 886 896 $scripts->add( 'jquery-ui-position', false, array( 'jquery-ui-core' ), '1.13.2', 1 ); 887 897 $scripts->add( 'jquery-ui-widget', false, array( 'jquery-ui-core' ), '1.13.2', 1 ); … … 916 926 $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array( 'jquery' ), '1.1-20110113', 1 ); 917 927 918 // Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv. 919 // It sets jQuery as a dependency, as the theme may have been implicitly loading it this way. 928 /* 929 * Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv. 930 * It sets jQuery as a dependency, as the theme may have been implicitly loading it this way. 931 */ 920 932 $scripts->add( 'imagesloaded', '/wp-includes/js/imagesloaded.min.js', array(), '4.1.4', 1 ); 921 933 $scripts->add( 'masonry', '/wp-includes/js/masonry.min.js', array( 'imagesloaded' ), '4.2.2', 1 ); … … 1339 1351 $scripts->add( 'wp-embed', "/wp-includes/js/wp-embed$suffix.js", array(), false, 1 ); 1340 1352 1341 // To enqueue media-views or media-editor, call wp_enqueue_media(). 1342 // Both rely on numerous settings, styles, and templates to operate correctly. 1353 /* 1354 * To enqueue media-views or media-editor, call wp_enqueue_media(). 1355 * Both rely on numerous settings, styles, and templates to operate correctly. 1356 */ 1343 1357 $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 ); 1344 1358 $scripts->set_translations( 'media-views' ); … … 1636 1650 'wp-components', 1637 1651 'wp-editor', 1638 // This need to be added before the block library styles, 1639 // The block library styles override the "reset" styles. 1652 /* 1653 * This needs to be added before the block library styles, 1654 * The block library styles override the "reset" styles. 1655 */ 1640 1656 'wp-reset-editor-styles', 1641 1657 'wp-block-library', … … 2715 2731 $attributes_string = ''; 2716 2732 2717 // If HTML5 script tag is supported, only the attribute name is added 2718 // to $attributes_string for entries with a boolean value, and that are true. 2733 /* 2734 * If HTML5 script tag is supported, only the attribute name is added 2735 * to $attributes_string for entries with a boolean value, and that are true. 2736 */ 2719 2737 foreach ( $attributes as $attribute_name => $attribute_value ) { 2720 2738 if ( is_bool( $attribute_value ) ) { … … 2897 2915 $style['css'] = file_get_contents( $style['path'] ); 2898 2916 2899 // Check if the style contains relative URLs that need to be modified. 2900 // URLs relative to the stylesheet's path should be converted to relative to the site's root. 2917 /* 2918 * Check if the style contains relative URLs that need to be modified. 2919 * URLs relative to the stylesheet's path should be converted to relative to the site's root. 2920 */ 2901 2921 $style['css'] = _wp_normalize_relative_css_links( $style['css'], $style['src'] ); 2902 2922 … … 3711 3731 $classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css"; 3712 3732 3713 // This follows the pattern of get_block_editor_theme_styles, 3714 // but we can't use get_block_editor_theme_styles directly as it 3715 // only handles external files or theme files. 3733 /* 3734 * This follows the pattern of get_block_editor_theme_styles, 3735 * but we can't use get_block_editor_theme_styles directly as it 3736 * only handles external files or theme files. 3737 */ 3716 3738 $classic_theme_styles_settings = array( 3717 3739 'css' => file_get_contents( $classic_theme_styles ),
Note: See TracChangeset
for help on using the changeset viewer.