Make WordPress Core

Opened 9 years ago

Closed 5 years ago

#36902 closed enhancement (wontfix)

Function __return_on

Reported by: compute's profile 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)

36902.diff (521 bytes) - added by Compute 9 years ago.

Download all attachments as: .zip

Change History (5)

#2 @Compute
9 years ago

  • Keywords has-patch added

@Compute
9 years ago

This ticket was mentioned in Slack in #core by noisysocks. View the logs.


5 years ago

#4 @noisysocks
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.