Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active_Callback not working for upload control #1732

Closed
rabindratharu opened this issue Dec 27, 2017 · 2 comments
Closed

Active_Callback not working for upload control #1732

rabindratharu opened this issue Dec 27, 2017 · 2 comments
Milestone

Comments

@rabindratharu
Copy link

rabindratharu commented Dec 27, 2017

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',
        ),
    ),
) );
@nk-o
Copy link

nk-o commented Jan 10, 2018

Same here.

@aristath
Copy link
Contributor

Should be fixed in the develop branch 👍
Fix will be included in v3.0.23

@aristath aristath added this to the 3.0.23 milestone Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants