Answer the question
In order to leave comments, you need to log in
WP Customizer API doesn't work with live editing. How to fix?
Hello.
I created a new topic, added a field in it to fill in the Customize API:
add_action( 'customize_register', static function ( WP_Customize_Manager $wp_customize ) {
if ( $panel_main_page = 'panel_main_page' ) {
$wp_customize->add_panel(
'panel_main_page',
array(
'title' => 'Контента на главной странице',
'priority' => 999,
)
);
if ( $name_section = 'header_h1' ) {
$wp_customize->add_section(
$name_section,
array(
'panel' => $panel_main_page,
'title' => 'Заголовок (h1) страницы',
'priority' => 0,
)
);
$wp_customize->add_setting(
'header_h1',
array(
'transport' => WPTEST_GET_THE_MOD_DEFAULT
)
);
$wp_customize->add_control(
'header_h1',
array(
'section' => $name_section,
'label' => 'Текст заголовка',
'type' => 'text'
)
);
}
}
} );
Answer the question
In order to leave comments, you need to log in
what does this line do for you?
'transport' => WPTEST_GET_THE_MOD_DEFAULT
By default, it should be set to refresh, which should refresh the page on changes. And in order to make changes right away, you need to write js for this
I haven't seen this kind of behavior. what are "LAN clients" and why should it be visible in them if it is disabled?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question