miturn
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [Tailor Page Builder] SettingAPIAndrew appreciate the help. If I’m customizing something on the page that is not a tailor element – like nav or header can I refresh the preview frame. Like in the wordpress customizer.
wp.customize.previewer.refresh(); or a selective refresh?
Forum: Plugins
In reply to: [Tailor Page Builder] SettingAPII tried the refresh after I couldn’t get it to work.
$panel_manager->add_control( 'theme_menu_text_color', array( 'label' => __( 'Navigation Font Color', 'theme' ), 'description' => __( '', 'theme' ), 'type' => 'color', 'priority' => 15, 'section' => 'general', 'setting' => 'theme_menu_color', ) );It seems that the wordpress color picker isn’t triggering a change.
I have quite a bit of other code in canvas.js that is working.
Forum: Plugins
In reply to: [Tailor Page Builder] SettingAPIThanks Andrew.
For the custom control, I registered a setting:
$panel_manager->add_setting( 'theme_menu_color', array( 'default' => "#000000", 'sanitize_callback' => 'tailor_sanitize_color', 'refresh' => array( 'theme' => 'js', ), ) );And then in canvas.js:
SettingAPI.onChange( 'sidebar:theme_menu_color', function( to, from ) { $('.theme-label').css({'color' : to }); } );It works once the page is refreshed. Just not the live js update.
Viewing 3 replies - 1 through 3 (of 3 total)