Opened 9 years ago
Closed 5 years ago
#36902 closed enhancement (wontfix)
Function __return_on
Reported by: | Compute | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
Adds a function that returns 'on'. Useful whenever you're filtering an option that requires an 'on' (checked checkbox without specified value) string.
Attachments (1)
Change History (5)
This ticket was mentioned in Slack in #core by noisysocks. View the logs.
5 years ago
#4
@
5 years ago
- Resolution set to wontfix
- Status changed from new to closed
While we'll never remove any of the __return
functions from WordPress due to backwards compatibility, I don't think we should be adding any more now that PHP supports anonymous functions.
The best thing to do here is to use an anonymous function e.g. function() { return 'on'; }
.
Note: See
TracTickets for help on using
tickets.
https://github.com/WordPress/WordPress/pull/210