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

Checkbox attribute fields are not set on the model when opening the shortcode UI #564

Open
goldenapples opened this issue Dec 11, 2015 · 0 comments

Comments

@goldenapples
Copy link
Contributor

From wp-shortcake/shortcake-bakery#165

Currently in our shortcode model, it's expected that a checkbox field should store a boolean value.

However, when we format a shortcode string, we don't treat boolean fields any differently than other field types, and serialize them as quoted values, ie attribute="true".

When opening the shortcode UI a second time for the shortcode, this field is then read as a string, rather than a boolean, and isn't set properly on the shortcode model (callbacks on the field will report its changed value as "true", rather than true, for example).

Related issues: #550, #359

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

1 participant