Active_Callback not working for upload control
rabindratharu opened this issue · comments
Rabindra Tharu commented
Issue description:
Hi
I'm trying to display upload field only when a hero layout is hero-layout-7 but it doesn't seem to work.
Version used:
3.0.22 ( Kirki Plugin )
Using theme_mods or options?
theme_mods
Code to reproduce the issue (config + field(s))
/*------------------------------------------------------
Custom Video URL Control
-------------------------------------------------------*/
Kirki::add_field( 'envy-blog_config', array(
'type' => 'upload',
'settings' => 'envy-blog_hero_custom_video_url',
'label' => esc_html__( 'Custom Video', 'envy-blog' ),
'description' => esc_html__( 'Upload your video in .mp4 format and minimize its file size for best results.', 'envy-blog' ),
'section' => 'envy-blog_hero_content_section',
'active_callback' => array(
array(
'setting' => 'envy-blog_hero_layout',
'operator' => '==',
'value' => 'hero-layout-7',
),
),
) );
Info:-
If change type => text
then active_callback is working properly.
/*------------------------------------------------------
Custom Video URL Control
-------------------------------------------------------*/
Kirki::add_field( 'envy-blog_config', array(
'type' => 'text',
'settings' => 'envy-blog_hero_custom_video_url',
'label' => esc_html__( 'Custom Video', 'envy-blog' ),
'description' => esc_html__( 'Upload your video in .mp4 format and minimize its file size for best results.', 'envy-blog' ),
'section' => 'envy-blog_hero_content_section',
'active_callback' => array(
array(
'setting' => 'envy-blog_hero_layout',
'operator' => '==',
'value' => 'hero-layout-7',
),
),
) );
Nikita commented
Same here.
Ari Stathopoulos commented
Should be fixed in the develop branch 👍
Fix will be included in v3.0.23