Is it possible to get a default value that was set in the Customizer setting? Here is an example of the code:
// Add setting.
$wp_customize->add_setting( 'slug_awesome_title', array(
'default' => esc_html__( 'WordPress', 'slug' ),
'sanitize_callback' => 'sanitize_text_field',
) );
// Add control.
$wp_customize->add_control( 'slug_awesome_title', array(
'label' => esc_html__( 'Section Title', 'slug' ),
'section' => 'slug_awesome_section',
'type' => 'text',
) );
If the current control has already a set value, let's say it's "WooCommerce", how can I get a default value which is set to "WordPress" using wp.customize API in JS?
I've tried this:
wp.customize.instance( 'slug_awesome_title' ).get()
but it returns the current value of the control.