Skip to content

Commit c710ca6

Browse files
committed
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 WordPress#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
1 parent fc826ae commit c710ca6

6 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎src/wp-includes/css/wp-embed-template.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ p.wp-embed-heading {
217217

218218
.wp-embed-share-dialog-open:focus .dashicons,
219219
.wp-embed-share-dialog-close:focus .dashicons {
220-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9);
220+
box-shadow: 0 0 0 1.5px #3858e9;
221221
/* Only visible in Windows High Contrast mode */
222222
outline: 2px solid transparent;
223223
border-radius: 100%;

‎src/wp-includes/embed.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ function print_embed_sharing_dialog() {
12331233
* @since 4.5.0
12341234
*/
12351235
function the_embed_site_title(): void {
1236-
$fallback_icon_url = includes_url( 'images/w-logo-blue.png' );
1236+
$fallback_icon_url = includes_url( 'images/w-logo-gray-white-bg.svg' );
12371237
$site_icon_url = get_site_icon_url( 32, $fallback_icon_url );
12381238

12391239
$icon_img = '';

‎src/wp-includes/functions.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,7 @@ function do_favicon() {
17521752
*/
17531753
do_action( 'do_faviconico' );
17541754

1755-
wp_redirect( get_site_icon_url( 32, includes_url( 'images/w-logo-blue-white-bg.png' ) ) );
1755+
wp_redirect( get_site_icon_url( 32, includes_url( 'images/w-logo-gray-white-bg.png' ) ) );
17561756
exit;
17571757
}
17581758

3.17 KB
Loading
Lines changed: 1 addition & 0 deletions
Loading

‎tests/phpunit/tests/general/template.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ public function test_the_embed_site_title_uses_fallback_when_attachment_url_fail
860860
add_filter( 'wp_get_attachment_image_src', '__return_false' );
861861
$output = get_echo( 'the_embed_site_title' );
862862

863-
$fallback = includes_url( 'images/w-logo-blue.png' );
863+
$fallback = includes_url( 'images/w-logo-gray-white-bg.svg' );
864864
$processor = new WP_HTML_Tag_Processor( $output );
865865

866866
$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
914914
*/
915915
public function test_the_embed_site_title_uses_fallback_without_srcset_when_no_site_icon_set(): void {
916916
$output = get_echo( 'the_embed_site_title' );
917-
$fallback = includes_url( 'images/w-logo-blue.png' );
917+
$fallback = includes_url( 'images/w-logo-gray-white-bg.svg' );
918918

919919
$processor = new WP_HTML_Tag_Processor( $output );
920920

0 commit comments

Comments
 (0)