Changeset 56246
- Timestamp:
- 07/17/2023 02:04:00 PM (17 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-scripts.php
r56092 r56246 915 915 } 916 916 917 // If the intended strategy is 'defer', limit the initial list of eligibles. 917 /* 918 * If the intended strategy is 'defer', limit the initial list of eligible 919 * strategies, since 'async' can fallback to 'defer', but not vice-versa. 920 */ 918 921 $initial = ( 'defer' === $intended ) ? array( 'defer' ) : null; 919 922 -
trunk/tests/phpunit/tests/dependencies/scripts.php
r56092 r56246 2944 2944 $actual = get_echo( 'wp_print_scripts', array( array( 'wp-tinymce' ) ) ); 2945 2945 2946 $this->assertStringNotContainsString( 'async', $actual ); 2946 $this->assertStringNotContainsString( 'async', $actual, 'TinyMCE should not have an async attribute.' ); 2947 $this->assertStringNotContainsString( 'defer', $actual, 'TinyMCE should not have a defer attribute.' ); 2948 } 2949 2950 /** 2951 * Make sure scripts with a loading strategy that are printed 2952 * without being enqueued are handled properly. 2953 * 2954 * @ticket 58648 2955 * 2956 * @dataProvider data_provider_delayed_strategies 2957 */ 2958 public function test_printing_non_enqueued_scripts( $strategy ) { 2959 wp_register_script( 'test-script', 'test-script.js', array(), false, array( 'strategy' => $strategy ) ); 2960 2961 $actual = get_echo( 'wp_print_scripts', array( array( 'test-script' ) ) ); 2962 2963 $this->assertStringContainsString( $strategy, $actual ); 2947 2964 } 2948 2965
Note: See TracChangeset
for help on using the changeset viewer.