Make WordPress Core

Changeset 60911


Ignore:
Timestamp:
10/07/2025 06:47:06 AM (2 months ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media.php

    r60910 r60911  
    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 {
Note: See TracChangeset for help on using the changeset viewer.