[wp-trac] [WordPress Trac] #43081: Custom logo issue in Customizer
WordPress Trac
noreply at wordpress.org
Thu Jan 18 11:38:46 UTC 2018
#43081: Custom logo issue in Customizer
---------------------------+------------------------------
Reporter: Guido07111975 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.9.1
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Comment (by lrdn):
The custom logo setting uses the {{{postMessage}}} transport by default
which requires changes to be handled manually using JavaScript. You can
however simply override the transport setting with {{{refresh}}} to
automatically reload the preview. In my opinion that's not a bug and won't
require any changes to the WordPress core.
{{{#!php
<?php
function custom_logo_setup()
{
add_theme_support('custom-logo', array
(
'width' => 250,
'height' => 250,
'flex-width' => true
));
}
add_action('after_setup_theme', 'custom_logo_setup');
function custom_logo_settings($wp_customize)
{
$wp_customize->get_setting('custom_logo')->transport = 'refresh';
}
add_action('customize_register', 'custom_logo_settings');
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43081#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list