[wp-trac] [WordPress Trac] #35268: Allow comparison of multiple values for checked(), selected(), and disabled()
WordPress Trac
noreply at wordpress.org
Thu Dec 31 19:13:21 UTC 2015
#35268: Allow comparison of multiple values for checked(), selected(), and
disabled()
--------------------------------------------+------------------------------
Reporter: kingkool68 | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Resolution: wontfix
Keywords: has-patch has-unit-tests close | Focuses:
--------------------------------------------+------------------------------
Changes (by kingkool68):
* status: new => closed
* resolution: => wontfix
Comment:
Replying to [comment:2 johnbillion]:
> Thanks for the patch @kingkool68, but I don't believe we need any
changes here. You can do this currently by passing `in_array()` to
`checked()`:
>
> {{{
> <input type="checkbox" <?php checked( in_array( $day, $selected_days )
); ?>>
> }}}
Ah that is pretty clever. I didn't think to do it that way. Thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35268#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list