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 Select + Code #2020

Closed
vlthemes opened this issue Nov 12, 2018 · 6 comments
Closed

Active Callback not working for Select + Code #2020

vlthemes opened this issue Nov 12, 2018 · 6 comments

Comments

@vlthemes
Copy link

VLT_Options::add_field( array(
	'type' => 'select',
	'settings' => 'site_gdpr',
	'section' => 'general_site_protection',
	'label' => esc_html__( 'GDPR Compatibility', 'leedo' ),
	'priority' => $priority++,
	'transport' => 'auto',
	'choices' => array(
		'enable' => esc_html__( 'Enable', 'leedo' ),
		'disable' => esc_html__( 'Disable', 'leedo' )
	),
	'default' => 'enable',
) );

VLT_Options::add_field( array(
	'type' => 'code',
	'settings' => 'site_gdpr_content',
	'section' => 'general_site_protection',
	'label' => esc_html__( 'Checkbox Content', 'leedo' ),
	'priority' => $priority++,
	'transport' => 'auto',
	'choices' => array(
		'language' => 'html',
	),
	'default' => '',
	'active_callback' => array(
		array(
			'setting' => 'site_gdpr',
			'operator' => '==',
			'value' => 'enable'
		)
	)
) );
@vlthemes
Copy link
Author

Also I have error in console log:

http://take.ms/UgPu6
http://take.ms/RIZCj

@niklasp
Copy link

niklasp commented Nov 21, 2018

can be labeled "support" probably #2026

@aristath
Copy link
Contributor

@vlthemes apologies for the delay.
Is this still an issue? Are you using the stable version from w.org, or the dev branch?

@vlthemes
Copy link
Author

I use wp.org version. Issue not fixed.

@aristath
Copy link
Contributor

fixed in the dev branch, will be included in 3.0.35 when released.

@vlthemes
Copy link
Author

Thank you so much :)

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