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

Optionally set checkbox values as 'true' or 'false' #682

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Dec 29, 2016

  1. Optionally set checkbox values as 'true' or 'false'

    Adds the attribute option 'explicitbool' for checkboxes. If a checkbox
    is registered with 'explicitbool' => true, then the shortcode will be
    formatted with that attribute string like `attribute="false"` if
    unchecked. If the shortcode attributes are retrieved using the shortcode
    tag as the third parameter to `shortcode_atts()`, then this value will
    be converted back to a boolean automatically.
    
    This allows better handling of default values for attributes -
    otherwise, if an attribute was set with a default value of "true", then
    even if it was unchecked, the next time the shortcode was opened to
    edit, that default would be applied and the checkbox would be reset to
    checked.
    goldenapples committed Dec 29, 2016
    Configuration menu
    Copy the full SHA
    2c82067 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee29b73 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e0ebbda View commit details
    Browse the repository at this point in the history