Make WordPress Core

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)

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

Download all attachments as: .zip

Change History (5)

#2 @Compute
10 years ago

  • Keywords has-patch added

@Compute
10 years ago

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


7 years ago

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