Opened 10 years ago
Closed 7 years ago
#36902 closed enhancement (wontfix)
Function __return_on
| Reported by: | Compute | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 4.6 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
7 years ago
#4
@
7 years ago
- Resolution → wontfix
- Status new → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
https://github.com/WordPress/WordPress/pull/210