[wp-trac] [WordPress Trac] #30875: enforce integers in add_filter priority

WordPress Trac noreply at wordpress.org
Fri Jan 2 03:08:52 UTC 2015


#30875: enforce integers in add_filter priority
------------------------------------------+------------------------------
 Reporter:  drrobotnik                    |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Plugins                       |     Version:  4.1
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch dev-feedback close  |     Focuses:
------------------------------------------+------------------------------

Comment (by valendesigns):

 So I found some odd results that can cause string based priorities to be
 removed completely and never fire when using `true` as a priority.

 Also, if you enter the priorities from above you get back `array( '7.2',
 'micky', 8, 9, 10 )`, but if you add an integer below 7.2 like 1. You get
 back `array( 'micky', 1, '7.2', 8, 9, 10 )`.

 I know you guys are against changing the filter, but it should still be
 sane. As it stands there doesn't appear to be a predictable pattern that
 can be tested for when you start throwing in wildcards.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30875#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list