WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 9 months 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)

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

Download all attachments as: .zip

Change History (5)

#2 @Compute
5 years ago

  • Keywords has-patch added

@Compute
4 years ago

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


9 months ago

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