From 9ca76c85c8ce225f68d3f8e299e2f1c444c51c49 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Thu, 11 Jun 2026 12:34:02 +0200 Subject: [PATCH 1/9] Charset: Limit UTF-8 ASCII scan to code point budget When _wp_scan_utf8() is called with max_code_points but no max_bytes, the ASCII fast path previously called strspn() across the entire remaining ASCII run before checking the code point limit. This made _wp_utf8_codepoint_span( large ASCII text, 0, 5 ) scan the full string. Bound strspn() by the remaining code point budget. ASCII code points are one byte, so this preserves the returned span and found count while avoiding work past the budget. Local benchmark, 10 MB ASCII _wp_utf8_codepoint_span( ..., 0, 5 ): original 3.183709 ms, patched 0.001250 ms. Differential fuzz: 189847 span/found cases and 2750 valid mb_substr sanity cases, no mismatches. --- src/wp-includes/compat-utf8.php | 2 +- .../tests/compat/wpUtf8CodePointSpan.php | 104 ++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 tests/phpunit/tests/compat/wpUtf8CodePointSpan.php diff --git a/src/wp-includes/compat-utf8.php b/src/wp-includes/compat-utf8.php index e1cab36ea3244..5fa8cde158789 100644 --- a/src/wp-includes/compat-utf8.php +++ b/src/wp-includes/compat-utf8.php @@ -65,7 +65,7 @@ function _wp_scan_utf8( string $bytes, int &$at, int &$invalid_length, ?int $max "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" . " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f", $i, - $end - $i + min( $end - $i, $max_count - $count ) ); if ( $count + $ascii_byte_count >= $max_count ) { diff --git a/tests/phpunit/tests/compat/wpUtf8CodePointSpan.php b/tests/phpunit/tests/compat/wpUtf8CodePointSpan.php new file mode 100644 index 0000000000000..4464f7da824d1 --- /dev/null +++ b/tests/phpunit/tests/compat/wpUtf8CodePointSpan.php @@ -0,0 +1,104 @@ +assertSame( + $expected_span, + _wp_utf8_codepoint_span( $text, $byte_offset, $max_code_points, $found_code_points ), + 'Should have found the expected byte span.' + ); + + $this->assertSame( + $expected_found, + $found_code_points, + 'Should have reported the expected number of code points.' + ); + } + + /** + * Data provider. + * + * @return array[] + */ + public static function data_codepoint_spans() { + $long_ascii_run = str_repeat( 'a', 1024 ); + + return array( + 'zero code point budget' => array( + 'abcdef', + 0, + 0, + 0, + 0, + ), + 'long ASCII run at start' => array( + $long_ascii_run, + 0, + 5, + 5, + 5, + ), + 'long ASCII run from non-zero offset' => array( + "zz{$long_ascii_run}", + 2, + 5, + 5, + 5, + ), + 'multibyte character before the boundary' => array( + "ab\u{1F170}cd", + 0, + 2, + 2, + 2, + ), + 'multibyte character at the boundary' => array( + "ab\u{1F170}cd", + 0, + 3, + strlen( "ab\u{1F170}" ), + 3, + ), + 'invalid span after the boundary' => array( + "ab\xF0\x9Fzz", + 0, + 2, + 2, + 2, + ), + 'invalid span at the boundary' => array( + "ab\xF0\x9Fzz", + 0, + 3, + 4, + 3, + ), + ); + } +} From a70518d2d6f1c63b857800aab3987117fdf5b6c5 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Thu, 11 Jun 2026 13:13:40 +0200 Subject: [PATCH 2/9] Tests: Refine UTF-8 code point span docs --- tests/phpunit/tests/compat/wpUtf8CodePointSpan.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/phpunit/tests/compat/wpUtf8CodePointSpan.php b/tests/phpunit/tests/compat/wpUtf8CodePointSpan.php index 4464f7da824d1..da66095ce79af 100644 --- a/tests/phpunit/tests/compat/wpUtf8CodePointSpan.php +++ b/tests/phpunit/tests/compat/wpUtf8CodePointSpan.php @@ -5,8 +5,6 @@ * @package WordPress * @subpackage Charset * - * @since 6.9.0 - * * @group compat * * @covers ::_wp_utf8_codepoint_span() @@ -15,8 +13,6 @@ class Tests_Compat_wpUtf8CodePointSpan extends WP_UnitTestCase { /** * Ensures that the span accounts for the requested number of code points. * - * @ticket 63863 - * * @dataProvider data_codepoint_spans * * @param string $text @@ -44,7 +40,7 @@ public function test_finds_codepoint_spans( string $text, int $byte_offset, int /** * Data provider. * - * @return array[] + * @return array */ public static function data_codepoint_spans() { $long_ascii_run = str_repeat( 'a', 1024 ); From 46f8f73aad2dc5e603f9b71811e945f9ee1fd96a Mon Sep 17 00:00:00 2001 From: Aki Hamano Date: Wed, 17 Jun 2026 10:34:52 +0000 Subject: [PATCH 3/9] Icons: Enforce strict name validation in the register method. Reject icon names that use uppercase letters, that lack a namespace prefix, or that have already been registered. Add tests covering these cases. Props im3dabasia1, mukesh27, wildworks. See #64847. git-svn-id: https://develop.svn.wordpress.org/trunk@62515 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-icons-registry.php | 28 +++++ tests/phpunit/tests/icons/wpIconsRegistry.php | 110 ++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 tests/phpunit/tests/icons/wpIconsRegistry.php diff --git a/src/wp-includes/class-wp-icons-registry.php b/src/wp-includes/class-wp-icons-registry.php index f82739fc5d91d..b096610c1b04f 100644 --- a/src/wp-includes/class-wp-icons-registry.php +++ b/src/wp-includes/class-wp-icons-registry.php @@ -115,6 +115,34 @@ protected function register( $icon_name, $icon_properties ) { return false; } + if ( preg_match( '/[A-Z]/', $icon_name ) ) { + _doing_it_wrong( + __METHOD__, + __( 'Icon names must not contain uppercase characters.' ), + '7.1.0' + ); + return false; + } + + $name_matcher = '/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/'; + if ( ! preg_match( $name_matcher, $icon_name ) ) { + _doing_it_wrong( + __METHOD__, + __( 'Icon names must contain a namespace prefix. Example: my-plugin/my-custom-icon' ), + '7.1.0' + ); + return false; + } + + if ( $this->is_registered( $icon_name ) ) { + _doing_it_wrong( + __METHOD__, + __( 'Icon is already registered.' ), + '7.1.0' + ); + return false; + } + $allowed_keys = array_fill_keys( array( 'label', 'content', 'filePath' ), 1 ); foreach ( array_keys( $icon_properties ) as $key ) { if ( ! array_key_exists( $key, $allowed_keys ) ) { diff --git a/tests/phpunit/tests/icons/wpIconsRegistry.php b/tests/phpunit/tests/icons/wpIconsRegistry.php new file mode 100644 index 0000000000000..fba2eacde43f5 --- /dev/null +++ b/tests/phpunit/tests/icons/wpIconsRegistry.php @@ -0,0 +1,110 @@ +registry = WP_Icons_Registry::get_instance(); + } + + public function tear_down() { + $instance_property = new ReflectionProperty( WP_Icons_Registry::class, 'instance' ); + + if ( PHP_VERSION_ID < 80100 ) { + $instance_property->setAccessible( true ); + } + + $instance_property->setValue( null, null ); + + $this->registry = null; + parent::tear_down(); + } + + /** + * Invokes WP_Icons_Registry::register despite it being private + * + * @param string $icon_name Icon name including namespace. + * @param array $icon_properties Icon properties (label, content, filePath). + * @return bool True if the icon was registered successfully. + */ + private function register( $icon_name, $icon_properties ) { + $method = new ReflectionMethod( $this->registry, 'register' ); + + if ( PHP_VERSION_ID < 80100 ) { + $method->setAccessible( true ); + } + + return $method->invoke( $this->registry, $icon_name, $icon_properties ); + } + + /** + * Provides invalid icon names. + * + * @return array[] + */ + public function data_invalid_icon_names() { + return array( + 'non-string name' => array( 1 ), + 'no namespace' => array( 'plus' ), + 'uppercase characters' => array( 'Test/Plus' ), + 'invalid characters' => array( 'test/_doing_it_wrong' ), + ); + } + + /** + * Should fail to re-register the same icon. + * + * @ticket 64847 + * + * @expectedIncorrectUsage WP_Icons_Registry::register + */ + public function test_register_icon_twice() { + $name = 'test-plugin/duplicate'; + $settings = array( + 'label' => 'Icon', + 'content' => '', + ); + + $result = $this->register( $name, $settings ); + $this->assertTrue( $result ); + $result2 = $this->register( $name, $settings ); + $this->assertFalse( $result2 ); + } + + + /** + * Should fail to register icon with invalid names. + * + * @ticket 64847 + * + * @dataProvider data_invalid_icon_names + * @expectedIncorrectUsage WP_Icons_Registry::register + * + * @param mixed $icon_name Icon name to register. + */ + public function test_register_invalid_name( $icon_name ) { + $settings = array( + 'label' => 'Icon', + 'content' => '', + ); + + $result = $this->register( $icon_name, $settings ); + $this->assertFalse( $result ); + } +} From 86a7239abaa4ff72ab9642be75f7c721da21fa50 Mon Sep 17 00:00:00 2001 From: Aki Hamano Date: Wed, 17 Jun 2026 10:56:19 +0000 Subject: [PATCH 4/9] Admin Reskin: Fix interactive control heights on mobile. Give interactive elements a consistent 40px height in the admin mobile viewport on the Add Plugins, Media Library grid, Settings > General, and Add Themes screens. Follow-up to [61645]. Props abcd95, wildworks. Fixes #64999. git-svn-id: https://develop.svn.wordpress.org/trunk@62516 602fd350-edb4-49c9-b593-d223f7449a82 --- .../media/views/button/select-mode-toggle.js | 2 +- src/wp-admin/css/common.css | 11 +++++ src/wp-admin/css/forms.css | 4 +- src/wp-admin/css/list-tables.css | 7 --- src/wp-admin/css/media.css | 19 +++++++- src/wp-admin/css/themes.css | 5 +-- .../includes/class-wp-media-list-table.php | 4 +- src/wp-admin/includes/plugin-install.php | 16 +++---- src/wp-admin/theme-install.php | 34 +++++++------- src/wp-admin/themes.php | 44 +++++++++---------- 10 files changed, 84 insertions(+), 62 deletions(-) diff --git a/src/js/media/views/button/select-mode-toggle.js b/src/js/media/views/button/select-mode-toggle.js index 2c2335bcd56f6..858c0e16cb2e4 100644 --- a/src/js/media/views/button/select-mode-toggle.js +++ b/src/js/media/views/button/select-mode-toggle.js @@ -40,7 +40,7 @@ SelectModeToggle = Button.extend(/** @lends wp.media.view.SelectModeToggle.proto render: function() { Button.prototype.render.apply( this, arguments ); - this.$el.addClass( 'select-mode-toggle-button' ); + this.$el.addClass( 'select-mode-toggle-button button-compact' ); return this; }, diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index 63e960b482c00..f48b8048c76e5 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -1417,6 +1417,17 @@ th.action-links { padding: 0; width: 50%; } + + .wp-filter .search-form input[type="search"] { + min-height: 40px; + padding: 0 12px; + } + + .wp-filter .search-form select, + .wp-filter .filter-items select { + min-height: 40px; + padding: 0 24px 0 12px; + } } @media only screen and (max-width: 320px) { diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index f2e5f9dcc5b53..c17d038c5d2c6 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -1798,9 +1798,10 @@ table.form-table td .updated p { p.search-box input[type="search"], p.search-box input[type="text"] { min-height: 40px; + padding: 0 12px; } - p.search-box input[type="submit"] { + p.search-box input[type="submit"].button { margin-bottom: 10px; } @@ -1944,6 +1945,7 @@ table.form-table td .updated p { .options-general-php input[type="text"].small-text { max-width: 6.25em; margin: 0; + min-height: 40px; } /* Privacy Policy settings screen */ diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css index 56d88d6801ddb..4eaa682127cc0 100644 --- a/src/wp-admin/css/list-tables.css +++ b/src/wp-admin/css/list-tables.css @@ -1537,13 +1537,6 @@ div.action-links, margin: 0; /* Override existing margins */ } -/* Use compact size for space-constrained plugin cards */ -.plugin-action-buttons li .button { - min-height: 32px; - line-height: 2.30769231; /* 30px for 32px min-height */ - padding: 0 12px; -} - .plugin-card h3 { margin: 0 12px 16px 0; font-size: 18px; diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index 805868a286304..5a169cfde9e01 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -374,6 +374,10 @@ .find-box-inside { bottom: 57px; } + + #delete_all { + margin-bottom: 0; + } } @media screen and (max-width: 660px) { @@ -1396,7 +1400,6 @@ audio, video { .wp-filter p.search-box { float: none; width: 100%; - margin-bottom: 20px; display: flex; flex-wrap: nowrap; column-gap: 0; @@ -1413,6 +1416,20 @@ audio, video { top: 46px; right: 10px; } + + .media-frame.mode-grid .media-toolbar select { + min-height: 40px; + padding: 0 24px 0 12px; + } + + .media-frame.mode-grid .media-toolbar input[type="search"] { + min-height: 40px; + padding: 0 12px; + } + + .wp-filter p.search-box { + margin-bottom: 0; + } } @media only screen and (max-width: 600px) { diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index 4a644974c50c4..e7eadd7f6941d 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -119,9 +119,6 @@ body.js .theme-browser.search-loading { .theme-browser .theme .theme-actions .button { float: none; margin-left: 3px; - min-height: 32px; - line-height: 2.30769231; /* 30px for 32px min-height */ - padding: 0 12px; } .theme-browser .theme .theme-actions .button.updated-message::before, @@ -1968,6 +1965,8 @@ body.full-overlay-active { .theme-install-overlay .wp-full-overlay-header .button { float: right; margin: 7px 10px 0 0; /* Vertically center 32px button in 45px header */ + min-height: 32px; + line-height: 2.30769231; /* 30px for 32px height with 13px font */ } .theme-install-overlay .wp-full-overlay-sidebar { diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index 572dc154de639..152ca94c6800d 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -247,7 +247,7 @@ protected function extra_tablenav( $which ) { if ( $this->is_trash && $this->has_items() && current_user_can( 'edit_others_posts' ) ) { - submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); + submit_button( __( 'Empty Trash' ), 'apply button-compact', 'delete_all', false ); } ?> @@ -351,7 +351,7 @@ public function views() { ?> - +

diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php index 7607b8823bb99..6b1a615a57ab8 100644 --- a/src/wp-admin/includes/plugin-install.php +++ b/src/wp-admin/includes/plugin-install.php @@ -940,7 +940,7 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible if ( $status['url'] ) { if ( $compatible_php && $compatible_wp && $all_plugin_dependencies_installed && ! empty( $data->download_link ) ) { $button = sprintf( - '%s', + '%s', esc_attr( $data->slug ), esc_url( $status['url'] ), /* translators: %s: Plugin name and version. */ @@ -950,7 +950,7 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible ); } else { $button = sprintf( - '', + '', _x( 'Install Now', 'plugin' ) ); } @@ -961,7 +961,7 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible if ( $status['url'] ) { if ( $compatible_php && $compatible_wp ) { $button = sprintf( - '%s', + '%s', esc_attr( $status['file'] ), esc_attr( $data->slug ), esc_url( $status['url'] ), @@ -972,7 +972,7 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible ); } else { $button = sprintf( - '', + '', _x( 'Update Now', 'plugin' ) ); } @@ -983,7 +983,7 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible case 'newer_installed': if ( is_plugin_active( $status['file'] ) ) { $button = sprintf( - '', + '', _x( 'Active', 'plugin' ) ); } elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) { @@ -1008,7 +1008,7 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible } $button = sprintf( - '%6$s', + '%6$s', esc_url( $activate_url ), esc_attr( $name ), esc_attr( $data->slug ), @@ -1018,13 +1018,13 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible ); } else { $button = sprintf( - '', + '', is_network_admin() ? _x( 'Network Activate', 'plugin' ) : _x( 'Activate', 'plugin' ) ); } } else { $button = sprintf( - '', + '', _x( 'Installed', 'plugin' ) ); } diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index 5723f8e6244cc..fc24334abff85 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -408,21 +408,21 @@ ?> <# if ( data.activate_url ) { #> <# if ( ! data.active ) { #> - + <# } else { #> - + <# } #> <# } #> <# if ( data.customize_url ) { #> <# if ( ! data.active ) { #> <# if ( ! data.block_theme ) { #> - + <# } #> <# } else { #> - + <# } #> <# } else { #> - + <# } #> <# } else { #> <# if ( data.activate_url ) { #> - + <# } #> <# if ( data.customize_url ) { #> - + <# } else { #> - + <# } #> <# } #> <# } else { #> @@ -444,15 +444,15 @@ /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Install %s', 'theme' ), '{{ data.name }}' ); ?> - - + + <# } else { #> - - + + <# } #> <# } #> @@ -487,18 +487,18 @@ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> <# if ( ! data.active ) { #> - + <# } else { #> - + <# } #> <# } else { #> - + <# } #> <# } else { #> <# if ( data.compatible_wp && data.compatible_php ) { #> - + <# } else { #> - + <# } #> <# } #> diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index ca9f52b2a164f..a9f24765ce742 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -381,18 +381,18 @@ $menu_hook = get_plugin_page_hook( $submenu[ $item[2] ][0][2], $item[2] ); if ( file_exists( WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}" ) || ! empty( $menu_hook ) ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } else { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } } elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) { $menu_file = $item[2]; if ( current_user_can( 'customize' ) ) { if ( 'custom-header' === $menu_file ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } elseif ( 'custom-background' === $menu_file ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } } @@ -402,9 +402,9 @@ } if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } else { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } } } @@ -609,7 +609,7 @@ /* translators: %s: Theme name. */ $customize_aria_label = sprintf( _x( 'Customize %s', 'theme' ), $theme['name'] ); ?> - @@ -619,7 +619,7 @@ /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -630,7 +630,7 @@ /* translators: %s: Theme name. */ $live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -640,7 +640,7 @@ /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -649,7 +649,7 @@ /* translators: %s: Theme name. */ $live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -1001,7 +1001,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $customize_aria_label = sprintf( _x( 'Customize %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -1012,7 +1012,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -1021,7 +1021,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -1030,7 +1030,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -1038,7 +1038,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' ); ?> - <# } #> @@ -1251,7 +1251,7 @@ function wp_theme_auto_update_setting_template() {
- @@ -1263,7 +1263,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -1273,7 +1273,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -1283,7 +1283,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' ); ?> - @@ -1292,7 +1292,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' ); ?> - <# } #> @@ -1304,7 +1304,7 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Delete %s', 'theme' ), '{{ data.name }}' ); ?> - From e7b0faf1674cb1a626d1763715dc1dea51be1437 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 17 Jun 2026 11:34:55 +0000 Subject: [PATCH 5/9] Media: Make `::update_size()` parameters consistent across image editors. Includes: * Standardizing default values on `null` vs. `false`. * Updating the documentation to correct parameter types. * Adding missing parameter descriptions. Follow-up to [22094]. Props Soean, mukesh27, SergeyBiryukov. See #64897. git-svn-id: https://develop.svn.wordpress.org/trunk@62517 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-image-editor-gd.php | 6 +++--- src/wp-includes/class-wp-image-editor-imagick.php | 5 +++-- src/wp-includes/class-wp-image-editor.php | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/class-wp-image-editor-gd.php b/src/wp-includes/class-wp-image-editor-gd.php index d89d366d71baf..3d93b5bd8a2c1 100644 --- a/src/wp-includes/class-wp-image-editor-gd.php +++ b/src/wp-includes/class-wp-image-editor-gd.php @@ -144,11 +144,11 @@ function_exists( 'imagecreatefromavif' ) && ( 'image/avif' === wp_get_image_mime * * @since 3.5.0 * - * @param int $width - * @param int $height + * @param int|null $width Image width. + * @param int|null $height Image height. * @return true */ - protected function update_size( $width = false, $height = false ) { + protected function update_size( $width = null, $height = null ) { if ( ! $width ) { $width = imagesx( $this->image ); } diff --git a/src/wp-includes/class-wp-image-editor-imagick.php b/src/wp-includes/class-wp-image-editor-imagick.php index 19b27ba12e2ae..2cb3a694c567b 100644 --- a/src/wp-includes/class-wp-image-editor-imagick.php +++ b/src/wp-includes/class-wp-image-editor-imagick.php @@ -247,12 +247,13 @@ public function set_quality( $quality = null, $dims = array() ) { * * @since 3.5.0 * - * @param int $width - * @param int $height + * @param int|null $width Image width. + * @param int|null $height Image height. * @return true|WP_Error */ protected function update_size( $width = null, $height = null ) { $size = null; + if ( ! $width || ! $height ) { try { $size = $this->image->getImageGeometry(); diff --git a/src/wp-includes/class-wp-image-editor.php b/src/wp-includes/class-wp-image-editor.php index d7fe151a0d94a..8401117836ebc 100644 --- a/src/wp-includes/class-wp-image-editor.php +++ b/src/wp-includes/class-wp-image-editor.php @@ -201,8 +201,8 @@ public function get_size() { * * @since 3.5.0 * - * @param int $width - * @param int $height + * @param int|null $width Image width. + * @param int|null $height Image height. * @return true */ protected function update_size( $width = null, $height = null ) { From 91e53dcc18701e9d34c838463122573713e0bf3d Mon Sep 17 00:00:00 2001 From: Carlos Bravo Date: Wed, 17 Jun 2026 14:48:28 +0000 Subject: [PATCH 6/9] Block Bindings: Add List Item Block Support. Add `core/list-item` to the block attributes supported by block bindings so its `content` rich text can be bound, and cover the basic (non-nested) case in the render tests. This is a clean enablement with no render-side changes. A List Item that contains a nested List keeps both inside the same `
  • `; preserving that nested list when `content` is bound is handled separately by the `WP_Block::replace_html()` inner-block fix. Props sauliusv, cbravobernal. See #65406. git-svn-id: https://develop.svn.wordpress.org/trunk@62518 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-bindings.php | 2 ++ tests/phpunit/tests/block-bindings/render.php | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/wp-includes/block-bindings.php b/src/wp-includes/block-bindings.php index 268bb6afa66bb..5a20c023149d7 100644 --- a/src/wp-includes/block-bindings.php +++ b/src/wp-includes/block-bindings.php @@ -134,6 +134,7 @@ function get_block_bindings_source( string $source_name ) { * Retrieves the list of block attributes supported by block bindings. * * @since 6.9.0 + * @since 7.1.0 Added support for the List Item block. * * @param string $block_type The block type whose supported attributes are being retrieved. * @return array The list of block attributes that are supported by block bindings. @@ -142,6 +143,7 @@ function get_block_bindings_supported_attributes( $block_type ) { $block_bindings_supported_attributes = array( 'core/paragraph' => array( 'content' ), 'core/heading' => array( 'content' ), + 'core/list-item' => array( 'content' ), 'core/image' => array( 'id', 'url', 'title', 'alt', 'caption' ), 'core/button' => array( 'url', 'text', 'linkTarget', 'rel' ), 'core/post-date' => array( 'datetime' ), diff --git a/tests/phpunit/tests/block-bindings/render.php b/tests/phpunit/tests/block-bindings/render.php index 77b0975105dc5..172bdff71315d 100644 --- a/tests/phpunit/tests/block-bindings/render.php +++ b/tests/phpunit/tests/block-bindings/render.php @@ -122,6 +122,16 @@ public function data_update_block_with_value_from_source() { , '

    test source value

    ', ), + 'list item block' => array( + 'content', + << +
  • This should not appear
  • + +HTML + , + '
  • test source value
  • ', + ), ); } From 2192530bb6e0c3ea17546e8f715133316ba00a8a Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Wed, 17 Jun 2026 14:55:58 +0000 Subject: [PATCH 7/9] HTML API: Improve comment about HTML syntax characters. Developed in https://github.com/WordPress/wordpress-develop/pull/12207. Follow-up to [62507]. Props dmsnell. See #64896. git-svn-id: https://develop.svn.wordpress.org/trunk@62519 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/html-api/wpHtmlTagProcessor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php index fd73ddc43a4ba..185d93b7a652c 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php @@ -890,7 +890,8 @@ public function test_attribute_ops_on_tag_closer_do_not_change_the_markup() { * //
    * ``` * - * To prevent it, `set_attribute` escapes dangerous characters (`"`, `'`, `<`, `>`, `&`) using HTML character references. + * To prevent it, `set_attribute` escapes HTML syntax characters like `"` using + * HTML character references. * * ```php *
    From fc826ae8a79b5ad11fa3aad4aea37c2a897a99e8 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 18 Jun 2026 00:09:23 +0000 Subject: [PATCH 8/9] Editor: Fix `wp-elements-*` CSS class name collisions for identical blocks. The `wp_get_elements_class_name()` function previously generated CSS class names by hashing the serialized block data via `md5()`. Identical blocks received the same `wp-elements-*` class name and the Style Engine deduplicated their CSS rules into one, causing a parent block's element style (e.g. link color) to cascade down and override a child block's identical style due to CSS source order. The function is updated to use `wp_unique_prefixed_id()` instead, generating sequential unique class names (`wp-elements-1`, `wp-elements-2`, etc.) that match the block editor's JavaScript implementation. The now-unused `$parsed_block` parameter is removed from the function signature. PHPStan rule level 10 errors are also resolved in the related code. See #64898. Developed in https://github.com/WordPress/wordpress-develop/pull/12126. Follow-up to r53260, r58074. Props tusharbharti, westonruter, wildworks. Fixes #65435. git-svn-id: https://develop.svn.wordpress.org/trunk@62520 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-supports/elements.php | 39 ++++++++-- .../wpRenderElementsSupport.php | 74 ++++++++++++++++-- .../wpRenderElementsSupportStyles.php | 76 ++++++++++++++++--- 3 files changed, 167 insertions(+), 22 deletions(-) diff --git a/src/wp-includes/block-supports/elements.php b/src/wp-includes/block-supports/elements.php index 54b96aa1dc064..d765a2c2b4b5a 100644 --- a/src/wp-includes/block-supports/elements.php +++ b/src/wp-includes/block-supports/elements.php @@ -12,11 +12,10 @@ * @since 6.0.0 * @access private * - * @param array $block Block object. * @return string The unique class name. */ -function wp_get_elements_class_name( $block ) { - return 'wp-elements-' . md5( serialize( $block ) ); +function wp_get_elements_class_name(): string { + return wp_unique_prefixed_id( 'wp-elements-' ); } /** @@ -109,6 +108,29 @@ function wp_should_add_elements_class_name( $block, $options ) { * * @param array $parsed_block The parsed block. * @return array The same parsed block with elements classname added if appropriate. + * + * @phpstan-param array{ + * blockName: string, + * attrs: array{ + * className?: string, + * style?: array{ + * elements?: array, + * ... + * }>, + * }, + * ... + * }, + * ... + * } $parsed_block + * @phpstan-return array{ + * blockName: string, + * attrs: array{ + * className?: string, + * ... + * }, + * ... + * } */ function wp_render_elements_support_styles( $parsed_block ) { /* @@ -129,9 +151,12 @@ function wp_render_elements_support_styles( $parsed_block ) { ); } - $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $parsed_block['blockName'] ); - $element_block_styles = $parsed_block['attrs']['style']['elements'] ?? null; + $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $parsed_block['blockName'] ); + if ( ! $block_type ) { + return $parsed_block; + } + $element_block_styles = $parsed_block['attrs']['style']['elements'] ?? null; if ( ! $element_block_styles ) { return $parsed_block; } @@ -157,7 +182,7 @@ function wp_render_elements_support_styles( $parsed_block ) { return $parsed_block; } - $class_name = wp_get_elements_class_name( $parsed_block ); + $class_name = wp_get_elements_class_name(); $updated_class_name = isset( $parsed_block['attrs']['className'] ) ? $parsed_block['attrs']['className'] . " $class_name" : $class_name; _wp_array_set( $parsed_block, array( 'attrs', 'className' ), $updated_class_name ); @@ -197,7 +222,7 @@ function wp_render_elements_support_styles( $parsed_block ) { ) ); - if ( isset( $element_style_object[':hover'] ) ) { + if ( isset( $element_style_object[':hover'], $element_config['hover_selector'] ) ) { wp_style_engine_get_styles( $element_style_object[':hover'], array( diff --git a/tests/phpunit/tests/block-supports/wpRenderElementsSupport.php b/tests/phpunit/tests/block-supports/wpRenderElementsSupport.php index 007ba8312e495..ad60844813188 100644 --- a/tests/phpunit/tests/block-supports/wpRenderElementsSupport.php +++ b/tests/phpunit/tests/block-supports/wpRenderElementsSupport.php @@ -159,6 +159,70 @@ public function test_elements_block_support_class_with_invalid_elements_prefix() ); } + /** + * Tests that duplicate blocks get distinct elements class names + * on their rendered markup to avoid CSS cascade conflicts. + * + * @ticket 65435 + * + * @covers ::wp_get_elements_class_name + */ + public function test_elements_block_support_class_with_duplicate_blocks(): void { + $this->test_block_name = 'test/element-block-supports'; + + register_block_type( + $this->test_block_name, + array( + 'api_version' => 3, + 'attributes' => array( + 'style' => array( + 'type' => 'object', + ), + ), + 'supports' => array( + 'color' => array( + 'link' => true, + ), + ), + ) + ); + + $block = array( + 'blockName' => $this->test_block_name, + 'attrs' => array( + 'style' => array( + 'elements' => array( + 'link' => array( + 'color' => array( + 'text' => 'var:preset|color|vivid-red', + ), + ), + ), + ), + ), + ); + + $block_markup = '

    Hello WordPress!

    '; + $elements_class_names = array(); + $count = 2; + for ( $i = 0; $i < $count; $i++ ) { + $rendered_block = wp_render_elements_class_name( $block_markup, wp_render_elements_support_styles( $block ) ); + + $processor = new WP_HTML_Tag_Processor( $rendered_block ); + $this->assertTrue( $processor->next_tag( 'P' ), "Expected paragraph in block #$i." ); + $elements_class_name = array_first( + array_filter( + iterator_to_array( $processor->class_list() ), + fn( string $class_name ) => (bool) preg_match( '/^wp-elements-\d+$/', $class_name ) + ) + ); + $this->assertIsString( $elements_class_name, "Expected wp-elements class in block #$i." ); + $elements_class_names[] = $elements_class_name; + } + + $this->assertSame( $count, count( array_unique( $elements_class_names ) ), 'Expected each rendered block to have a unique wp-elements class name.' ); + } + /** * Data provider. * @@ -238,7 +302,7 @@ public function data_elements_block_support_class() { 'button' => array( 'color' => $color_styles ), ), 'block_markup' => '

    Hello WordPress!

    ', - 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', + 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', ), 'link element styles apply class to wrapper' => array( 'color_settings' => array( 'link' => true ), @@ -246,7 +310,7 @@ public function data_elements_block_support_class() { 'link' => array( 'color' => $color_styles ), ), 'block_markup' => '

    Hello WordPress!

    ', - 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', + 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', ), 'heading element styles apply class to wrapper' => array( 'color_settings' => array( 'heading' => true ), @@ -254,7 +318,7 @@ public function data_elements_block_support_class() { 'heading' => array( 'color' => $color_styles ), ), 'block_markup' => '

    Hello WordPress!

    ', - 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', + 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', ), 'element styles apply class to wrapper when it has other classes' => array( 'color_settings' => array( 'link' => true ), @@ -262,7 +326,7 @@ public function data_elements_block_support_class() { 'link' => array( 'color' => $color_styles ), ), 'block_markup' => '

    Hello WordPress!

    ', - 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', + 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', ), 'element styles apply class to wrapper when it has other attributes' => array( 'color_settings' => array( 'link' => true ), @@ -270,7 +334,7 @@ public function data_elements_block_support_class() { 'link' => array( 'color' => $color_styles ), ), 'block_markup' => '

    Hello WordPress!

    ', - 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', + 'expected_markup' => '/^

    Hello WordPress<\/a>!<\/p>$/', ), ); } diff --git a/tests/phpunit/tests/block-supports/wpRenderElementsSupportStyles.php b/tests/phpunit/tests/block-supports/wpRenderElementsSupportStyles.php index 16ed26fc9c7bc..5c9fc8af5819d 100644 --- a/tests/phpunit/tests/block-supports/wpRenderElementsSupportStyles.php +++ b/tests/phpunit/tests/block-supports/wpRenderElementsSupportStyles.php @@ -68,6 +68,62 @@ public function test_elements_block_support_styles( $color_settings, $elements_s ); } + /** + * Tests that identical blocks with different elements styles + * generate distinct class names to avoid CSS cascade conflicts. + * + * @ticket 65435 + * + * @covers ::wp_get_elements_class_name + */ + public function test_elements_block_support_styles_with_duplicate_blocks(): void { + $this->test_block_name = 'test/element-block-supports'; + + register_block_type( + $this->test_block_name, + array( + 'api_version' => 3, + 'attributes' => array( + 'style' => array( + 'type' => 'object', + ), + ), + 'supports' => array( + 'color' => array( + 'link' => true, + ), + ), + ) + ); + + $block = array( + 'blockName' => $this->test_block_name, + 'attrs' => array( + 'style' => array( + 'elements' => array( + 'link' => array( + 'color' => array( + 'text' => 'blue', + ), + ), + ), + ), + ), + ); + + // Process two identical blocks with the same elements styles. + $count = 2; + for ( $i = 0; $i < $count; $i++ ) { + wp_render_elements_support_styles( $block ); + } + $actual_stylesheet = wp_style_engine_get_stylesheet_from_context( 'block-supports', array( 'prettify' => false ) ); + + // Count the number of distinct class names to confirm uniqueness. + $this->assertSame( $count, preg_match_all( '/\.wp-elements-(\d+)/', $actual_stylesheet, $matches ) ); + $unique_classes = array_unique( $matches[1] ); + $this->assertCount( $count, $unique_classes, 'Both blocks should produce distinct class names' ); + } + /** * Data provider. * @@ -127,7 +183,7 @@ public function data_elements_block_support_styles() { 'elements_styles' => array( 'button' => array( 'color' => $color_styles ), ), - 'expected_styles' => '/^.wp-elements-[a-f0-9]{32} .wp-element-button, .wp-elements-[a-f0-9]{32} .wp-block-button__link' . $color_css_rules . '$/', + 'expected_styles' => '/^.wp-elements-\d+ .wp-element-button, .wp-elements-\d+ .wp-block-button__link' . $color_css_rules . '$/', ), 'link element styles are applied' => array( 'color_settings' => array( 'link' => true ), @@ -139,15 +195,15 @@ public function data_elements_block_support_styles() { ), ), ), - 'expected_styles' => '/^.wp-elements-[a-f0-9]{32} a:where\(:not\(.wp-element-button\)\)' . $color_css_rules . - '.wp-elements-[a-f0-9]{32} a:where\(:not\(.wp-element-button\)\):hover' . $color_css_rules . '$/', + 'expected_styles' => '/^.wp-elements-\d+ a:where\(:not\(.wp-element-button\)\)' . $color_css_rules . + '.wp-elements-\d+ a:where\(:not\(.wp-element-button\)\):hover' . $color_css_rules . '$/', ), 'generic heading element styles are applied' => array( 'color_settings' => array( 'heading' => true ), 'elements_styles' => array( 'heading' => array( 'color' => $color_styles ), ), - 'expected_styles' => '/^.wp-elements-[a-f0-9]{32} h1, .wp-elements-[a-f0-9]{32} h2, .wp-elements-[a-f0-9]{32} h3, .wp-elements-[a-f0-9]{32} h4, .wp-elements-[a-f0-9]{32} h5, .wp-elements-[a-f0-9]{32} h6' . $color_css_rules . '$/', + 'expected_styles' => '/^.wp-elements-\d+ h1, .wp-elements-\d+ h2, .wp-elements-\d+ h3, .wp-elements-\d+ h4, .wp-elements-\d+ h5, .wp-elements-\d+ h6' . $color_css_rules . '$/', ), 'individual heading element styles are applied' => array( 'color_settings' => array( 'heading' => true ), @@ -159,12 +215,12 @@ public function data_elements_block_support_styles() { 'h5' => array( 'color' => $color_styles ), 'h6' => array( 'color' => $color_styles ), ), - 'expected_styles' => '/^.wp-elements-[a-f0-9]{32} h1' . $color_css_rules . - '.wp-elements-[a-f0-9]{32} h2' . $color_css_rules . - '.wp-elements-[a-f0-9]{32} h3' . $color_css_rules . - '.wp-elements-[a-f0-9]{32} h4' . $color_css_rules . - '.wp-elements-[a-f0-9]{32} h5' . $color_css_rules . - '.wp-elements-[a-f0-9]{32} h6' . $color_css_rules . '$/', + 'expected_styles' => '/^.wp-elements-\d+ h1' . $color_css_rules . + '.wp-elements-\d+ h2' . $color_css_rules . + '.wp-elements-\d+ h3' . $color_css_rules . + '.wp-elements-\d+ h4' . $color_css_rules . + '.wp-elements-\d+ h5' . $color_css_rules . + '.wp-elements-\d+ h6' . $color_css_rules . '$/', ), ); } From c710ca6b53db970d1b59b4e34ba130b25458ec1b Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 18 Jun 2026 02:04:14 +0000 Subject: [PATCH 9/9] Embeds: Replace the blue site icon fallback with the gray WordPress logo. Adds gray WordPress logo image files (`w-logo-gray-white-bg.png` and `w-logo-gray-white-bg.svg`) to `wp-includes/images/`, and updates `the_embed_site_title()` and `do_favicon()` to use the new images as the fallback site icon, maintaining visual consistency with the login screen logo updated in r61989. Replaces CSS custom property references for focus styles in the embed template (`--wp-admin-theme-color` and `--wp-admin-border-width-focus`) with their literal values, as these admin-theme variables are not defined in the oEmbed template context. Developed in https://github.com/WordPress/wordpress-develop/pull/11293. Follow-up to r61652, r61989, r62502. Props sabernhardt, huzaifaalmesbah, westonruter, jamesbregenzer. See #64708. Fixes #64877. git-svn-id: https://develop.svn.wordpress.org/trunk@62521 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/css/wp-embed-template.css | 2 +- src/wp-includes/embed.php | 2 +- src/wp-includes/functions.php | 2 +- src/wp-includes/images/w-logo-gray-white-bg.png | Bin 0 -> 3241 bytes src/wp-includes/images/w-logo-gray-white-bg.svg | 1 + tests/phpunit/tests/general/template.php | 4 ++-- 6 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 src/wp-includes/images/w-logo-gray-white-bg.png create mode 100644 src/wp-includes/images/w-logo-gray-white-bg.svg diff --git a/src/wp-includes/css/wp-embed-template.css b/src/wp-includes/css/wp-embed-template.css index 6118ab4d2b6d1..9bf606589a773 100644 --- a/src/wp-includes/css/wp-embed-template.css +++ b/src/wp-includes/css/wp-embed-template.css @@ -217,7 +217,7 @@ p.wp-embed-heading { .wp-embed-share-dialog-open:focus .dashicons, .wp-embed-share-dialog-close:focus .dashicons { - box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9); + box-shadow: 0 0 0 1.5px #3858e9; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; border-radius: 100%; diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php index 636f6acd94e6b..10558caed6f8c 100644 --- a/src/wp-includes/embed.php +++ b/src/wp-includes/embed.php @@ -1233,7 +1233,7 @@ function print_embed_sharing_dialog() { * @since 4.5.0 */ function the_embed_site_title(): void { - $fallback_icon_url = includes_url( 'images/w-logo-blue.png' ); + $fallback_icon_url = includes_url( 'images/w-logo-gray-white-bg.svg' ); $site_icon_url = get_site_icon_url( 32, $fallback_icon_url ); $icon_img = ''; diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index c297864859aa4..d7d2ff3fed89a 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -1752,7 +1752,7 @@ function do_favicon() { */ do_action( 'do_faviconico' ); - wp_redirect( get_site_icon_url( 32, includes_url( 'images/w-logo-blue-white-bg.png' ) ) ); + wp_redirect( get_site_icon_url( 32, includes_url( 'images/w-logo-gray-white-bg.png' ) ) ); exit; } diff --git a/src/wp-includes/images/w-logo-gray-white-bg.png b/src/wp-includes/images/w-logo-gray-white-bg.png new file mode 100644 index 0000000000000000000000000000000000000000..0adbfad427550458fbaf46ba929a119201daed27 GIT binary patch literal 3241 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 bzW@UO^iA1I4jy`S00000NkvXXu0mjfq?$19 literal 0 HcmV?d00001 diff --git a/src/wp-includes/images/w-logo-gray-white-bg.svg b/src/wp-includes/images/w-logo-gray-white-bg.svg new file mode 100644 index 0000000000000..6cb698ca9a607 --- /dev/null +++ b/src/wp-includes/images/w-logo-gray-white-bg.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/phpunit/tests/general/template.php b/tests/phpunit/tests/general/template.php index 20f6d0012b3a7..00b683971a6a0 100644 --- a/tests/phpunit/tests/general/template.php +++ b/tests/phpunit/tests/general/template.php @@ -860,7 +860,7 @@ public function test_the_embed_site_title_uses_fallback_when_attachment_url_fail add_filter( 'wp_get_attachment_image_src', '__return_false' ); $output = get_echo( 'the_embed_site_title' ); - $fallback = includes_url( 'images/w-logo-blue.png' ); + $fallback = includes_url( 'images/w-logo-gray-white-bg.svg' ); $processor = new WP_HTML_Tag_Processor( $output ); $this->assertTrue( $processor->next_tag( 'IMG' ), 'Expected IMG tag with fallback.' ); @@ -914,7 +914,7 @@ public function test_the_embed_site_title_omits_srcset_when_1x_and_2x_urls_are_i */ public function test_the_embed_site_title_uses_fallback_without_srcset_when_no_site_icon_set(): void { $output = get_echo( 'the_embed_site_title' ); - $fallback = includes_url( 'images/w-logo-blue.png' ); + $fallback = includes_url( 'images/w-logo-gray-white-bg.svg' ); $processor = new WP_HTML_Tag_Processor( $output );