I have a simple control that displays a checkbox in the Customizer:
$wp_customize->add_setting( 'display_about_text', array(
'default' => true
) );
$wp_customize->add_control( 'display_about_text', array(
'label' => __( 'Display Text', 'my_theme_name' ),
'type' => 'checkbox',
'section' => 'about'
) );
I would like to bold Display Text
in the Customizer, so I changed the label line to:
'label' => __( '<strong>Display Text</strong>', 'minitheme' ),
However, it just outputs the HTML tags in the Customizer like this:
<strong>Display Text</strong>
How do I get it to display bold instead of outputting the HTML? I've run into this problem several times when I try to output HTML in the Customizer. Same problem with esc_html()
.