Skip to content

Commit 73e822f

Browse files
committed
Media: Add test case for removing "img_auto_sizes_contain_css_fix" by dequeueing handle at wp_enqueue_scripts.
From 6.9 and beyond, dequeueing the `wp-img-auto-sizes-contain` style handle would be preferable to removing the action at `wp_head`. Follow-up to [60910], [59435]. See #62731, #62413. git-svn-id: https://develop.svn.wordpress.org/trunk@60911 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2ffca40 commit 73e822f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/phpunit/tests/media.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6601,6 +6601,17 @@ public function data_provider_data_provider_to_test_wp_enqueue_img_auto_sizes_co
66016601
'set_up' => null,
66026602
'expected' => true,
66036603
),
6604+
'dequeued' => array(
6605+
'set_up' => static function (): void {
6606+
add_action(
6607+
'wp_enqueue_scripts',
6608+
static function () {
6609+
wp_dequeue_style( 'wp-img-auto-sizes-contain' );
6610+
}
6611+
);
6612+
},
6613+
'expected' => false,
6614+
),
66046615
'filtered_off' => array(
66056616
'set_up' => static function (): void {
66066617
add_filter( 'wp_img_tag_add_auto_sizes', '__return_false' );

0 commit comments

Comments
 (0)