[wp-trac] [WordPress Trac] #33738: Quotes and other texturize characters are displayed differently in the customizer vs the front end of site
WordPress Trac
noreply at wordpress.org
Wed Feb 3 21:07:58 UTC 2016
#33738: Quotes and other texturize characters are displayed differently in the
customizer vs the front end of site
--------------------------+-----------------------
Reporter: seawaves | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.5
Component: Customize | Version: 4.3
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------
Changes (by westonruter):
* status: closed => reopened
* resolution: wontfix =>
* milestone: => 4.5
Comment:
This will be able to be fixed in 4.5 once selective refresh lands: #27355.
The question then remains as to whether Core themes should be updated to
implement selective refresh for the site title and tagline.
The theme code could look like this:
{{{#!php
<?php
add_action( 'customize_register', function( WP_Customize_Manager
$wp_customize ) {
// Abort if partials are not implemented.
if ( ! method_exists( $wp_customize, 'add_partial' ) ) {
return;
}
$setting = $wp_customize->get_setting( 'blogname' );
$wp_customize->add_partial( $setting->id, array(
'selector' => '.site-title a',
'settings' => $setting->id, /* Note this is optional;
default is to use partial ID */
'render_callback' => function() {
bloginfo( 'name' );
},
) );
$setting->transport = 'postMessage';
$setting = $wp_customize->get_setting( 'blogdescription' );
$manager->add_partial( $setting->id, array(
'selector' => '.site-description',
'settings' => $setting->id, /* Note this is optional;
default is to use partial ID */
'render_callback' => function() {
bloginfo( 'description' );
},
) );
$setting->transport = 'postMessage';
}, 100 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33738#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list