[wp-trac] [WordPress Trac] #53801: Block-based Widgets Screen does action wp_footer after each Widget

WordPress Trac noreply at wordpress.org
Fri Aug 27 13:22:07 UTC 2021


#53801: Block-based Widgets Screen does action wp_footer after each Widget
--------------------------+---------------------
 Reporter:  MadtownLems   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.8.1
Component:  Widgets       |     Version:  5.8
 Severity:  major         |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by zieladam):

 Using wp_head and wp_footer in the preview may indeed add some unexpected
 content there. At the same time, not having the preview seems like a
 broken experience. So there is not a single solution that could make
 things just right.

 My two cents are that we probably can't solve all the cases here, but we
 likely can solve most of them. To get more practical: We want to hide any
 extra content a) rendered by PHP and b) added in the runtime by
 javascript. Assuming iframed preview, I wonder if this rule would already
 account for most cases: `body > *:not(.allowlisted_preview_div) { display:
 none !important; pointer-events: none !important; opacity: 0 !important; }
 `.

 Sure, it is possible to write a script that will overcome that. But how
 often does that actually happen?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53801#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list