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 for dropdown-pages control issue #2055

Closed
VladNov opened this issue Jan 9, 2019 · 3 comments
Closed

Active_callback for dropdown-pages control issue #2055

VladNov opened this issue Jan 9, 2019 · 3 comments

Comments

@VladNov
Copy link

VladNov commented Jan 9, 2019

Issue description:

The active_callback is not applied to the dropdown-pages control and it's always stays visible.

Version used:

3.0.35.3

Using theme_mods or options?

theme_mods

Code to reproduce the issue (config + field(s))

          Kirki::add_field( 'theme_config_id',  array(
                'type'        => 'radio-buttonset',
                'settings'    => 'setting_name_buttonset',
                'label'       => esc_attr__( 'Label, 'viewpoint' ),
                'section'     => 'section_id,
                'default'     => 'option-1'',
                'choices'     => array(
                    'option-1'    => esc_attr__( 'Option 1', 'kirki' ),
                    'option-2'    => esc_attr__( 'Option 2', 'kirki' ),
                    'option-3'    => esc_attr__( 'Option 3', 'kirki' ),
                )
            ));

           Kirki::add_field( 'theme_config_id',  array(
                'type'        => 'dropdown-pages',
                    'settings'    => 'setting_name_pages',
                    'label'       => esc_attr__( 'Select Page', 'kirki' ),
                    'default'     => 2,
                    'section'     => 'section_id_2',
                    'active_callback'   => array(
                        array(
                            'setting'  => 'setting_name_buttonset',
                            'operator' => '==',
                            'value'    => 'option-3',
                        )
                    )
            ));
aristath added a commit that referenced this issue Jan 12, 2019
@aristath
Copy link
Contributor

@VladNov can you please check now with the develop branch? I pushed a commit that should fix this

@VladNov
Copy link
Author

VladNov commented Jan 13, 2019

@aristath Yep, it's fixed. Thank you for the update!

@aristath
Copy link
Contributor

Glad I could help 👍

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

2 participants