[wp-trac] [WordPress Trac] #35982: The new feature 'site logo' is not working on-the-fly (postMessage)

WordPress Trac noreply at wordpress.org
Thu Jul 28 20:26:40 UTC 2016


#35982: The new feature 'site logo' is not working on-the-fly (postMessage)
--------------------------+--------------------------
 Reporter:  sidati        |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:  javascript
--------------------------+--------------------------

Comment (by westonruter):

 Replying to [comment:9 dgwyer]:
 > And keep getting the error: "WARNING: CREATING DEFAULT OBJECT FROM EMPTY
 VALUE IN [path ommitted] ON LINE 15".

 @dgwyer the issue is that
 [https://core.trac.wordpress.org/ticket/35982#comment:1 my comment] was
 written when the feature was called “Site Logo”. Later in the release it
 was renamed to “Custom Logo”. I just updated my comment to reflect this
 change, and here is a more robust example you could use:

 {{{#!php
 <?php
 add_action( 'customize_register', function( $wp_customize ) {

         // Bail if not WP>=4.5.
         if ( ! isset( $wp_customize->selective_refresh ) ) {
                 return;
         }

         // Bail if theme doesn't have Custom Logo partial (likely doesn't
 support it).
         $partial = $wp_customize->selective_refresh->get_partial(
 'custom_logo' );
         if ( ! $partial ) {
                 return;
         }

         $partial->fallback_refresh = false;
 }, 20 );
 }}}

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


More information about the wp-trac mailing list