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

WordPress Trac noreply at wordpress.org
Wed Jan 4 08:55:29 UTC 2023


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

Comment (by domainsupport):

 Seeing as the issue has not yet been fixed in Gutenberg, what is the
 recommended method for preventing the issue for plugin developers? I have
 come up with this ... ?

 {{{#!php
 <?php
 add_action( 'wp_footer', 'wp_footer_proof_of_concept' );

 function wp_footer_proof_of_concept() {

 if (!(defined('REST_REQUEST') && REST_REQUEST)) {

 echo "Why is this being output on the Widgets screen?";

 }

 }
 }}}

 Please confirm.

 Oliver

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


More information about the wp-trac mailing list