Skip to content

Commit

Permalink
Gutenberg 19.9: don't show launch banner when the site is previewed i…
Browse files Browse the repository at this point in the history
…n Appearance -> Design (#40695)
  • Loading branch information
fushar authored Dec 20, 2024
1 parent 95609ee commit a9355bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Gutenberg 19.9: don't show launch banner when the site is previewed in Appearance -> Design
5 changes: 5 additions & 0 deletions projects/plugins/wpcomsh/private-site/logged-in-banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ function show_logged_in_banner() {

el.style.display = 'none';
document.addEventListener( 'DOMContentLoaded', function() {
// Don't show the banner if the site is previewed via an iframe.
if ( window.top !== window.self ) {
return;
}

var el = document.querySelector( '#wpcom-launch-banner-wrapper' );
if ( el ) {
el.style.display = null;
Expand Down

0 comments on commit a9355bd

Please sign in to comment.