[wp-trac] [WordPress Trac] #24431: Boolean shorthand for add_filter
WordPress Trac
noreply at wordpress.org
Mon Jul 1 16:10:50 UTC 2013
#24431: Boolean shorthand for add_filter
-------------------------+------------------------------
Reporter: ryanve | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Performance | Version:
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by ryanve):
@toscho Priorities could work in one of two ways. I'm open to either.
**1** is simpler. **2** is more capable:
1. Subsequent (later priority) callbacks run as normal. `false` would work
just like `__return_false` does now.
1. Booleans provide a way to `break` from the loop. Subsequent (later
priority) callbacks would not fire.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24431#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list