[wp-trac] [WordPress Trac] #30862: Remove negative priority on actions
WordPress Trac
noreply at wordpress.org
Tue Dec 30 22:59:51 UTC 2014
#30862: Remove negative priority on actions
--------------------------+------------------------------
Reporter: drrobotnik | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 4.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by drrobotnik):
I'm fine with adding a _doing_it_wrong() notice in order to prevent things
from being broken and to give people time to work on another approach.
A quick regex search through WP add_action finds no instances of WP core
using negative numbers. There is pretty solid evidence that the intention
was to give devs a threshold to work with since the default priority is 10
and WP core usually uses 0-10. But, it's now being cleverly abused.
I'd prefer to modify the priority as it shouldn't "break" anything, they
just won't get the priority they want, which is the point of the fix. The
cases where I've seen this used is to get around perceived limitations.
The problem with this is that they're asserting that they have a higher
importance then everything else, including sometimes core WP priority.
How can we move forward with the doing_it_wrong() notice? Patch?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30862#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list