Changeset 56092
- Timestamp:
- 06/28/2023 02:14:58 PM (17 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-scripts.php
r56033 r56092 908 908 */ 909 909 private function get_eligible_loading_strategy( $handle ) { 910 $eligible = $this->filter_eligible_strategies( $handle ); 911 912 // Bail early once we know the eligible strategy is blocking. 910 $intended = (string) $this->get_data( $handle, 'strategy' ); 911 912 // Bail early if there is no intended strategy. 913 if ( ! $intended ) { 914 return ''; 915 } 916 917 // If the intended strategy is 'defer', limit the initial list of eligibles. 918 $initial = ( 'defer' === $intended ) ? array( 'defer' ) : null; 919 920 $eligible = $this->filter_eligible_strategies( $handle, $initial ); 921 922 // Return early once we know the eligible strategy is blocking. 913 923 if ( empty( $eligible ) ) { 914 924 return ''; -
trunk/tests/phpunit/tests/dependencies/scripts.php
r56033 r56092 2933 2933 2934 2934 /** 2935 * Ensure tinymce scripts aren't loading async. 2936 * 2937 * @ticket 58648 2938 */ 2939 public function test_printing_tinymce_scripts() { 2940 global $wp_scripts; 2941 2942 wp_register_tinymce_scripts( $wp_scripts, true ); 2943 2944 $actual = get_echo( 'wp_print_scripts', array( array( 'wp-tinymce' ) ) ); 2945 2946 $this->assertStringNotContainsString( 'async', $actual ); 2947 } 2948 2949 /** 2935 2950 * Parse an HTML markup fragment. 2936 2951 *
Note: See TracChangeset
for help on using the changeset viewer.