[wp-trac] [WordPress Trac] #41126: Customizer does not work if both wp_footer() and wp_head() functions are not present in the theme.

WordPress Trac noreply at wordpress.org
Thu Jun 22 22:26:33 UTC 2017


#41126: Customizer does not work if both wp_footer() and wp_head() functions are
not present in the theme.
-------------------------+-----------------------------
 Reporter:  mdifelice    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Customize    |     Version:  4.7
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  administration
-------------------------+-----------------------------
Changes (by westonruter):

 * version:  trunk => 4.7
 * type:  defect (bug) => enhancement
 * milestone:  Awaiting Review => Future Release


Comment:

 @mdifelice as of 4.7 there's actually a facility for this. Namely, the
 `wp.customize.state( 'previewerAlive' )` value. See
 https://github.com/WordPress/wordpress-
 develop/blob/c321e10c1642fabed623292d1d157d341662b7d9/src/wp-admin/js
 /customize-controls.js#L3888-L3936

 So what a patch here could look like is:

 {{{#!js
 wp.customize.state( 'previewerAlive' ).bind( function( isAlive ) {
     if ( isAlive ) {
         // Hide notification.
     } else {
         // Show notification.
     }
 });
 }}}

 The notification could be displayed via #35210.

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


More information about the wp-trac mailing list