[wp-trac] [WordPress Trac] #30862: Remove negative priority on actions
WordPress Trac
noreply at wordpress.org
Wed Dec 31 01:27:17 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):
Replying to [comment:4 mordauk]:
> I can't really see an advantage to changing this. Sure it's not 100%
intuitive, but there are no problems caused by it, at least not that I'm
aware of.
The intuitiveness is not the issue. It's about establishing a proper queue
order. Developers using this know they're using a hack.
Here is a purposely basic example:
`add_action( 'wp_print_styles', array( $this, 'implode_frontend_css' ), -1
); // Run first`
... "Run first" until Dev B sees this and says don't implode my css:
`add_action( 'wp_print_styles', 'my_css_is_important_dont_implode', -200
); // Really run first`
> Even trigging `_doing_it_wrong()` notices is going to cause some pretty
significant issues for a ''huge'' number of plugins.
I think thats a bit of an exaggeration. Significant because we add a
notice? If there is a proper reason to load before core, then
create/propose a proper method for doing so.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30862#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list