[wp-trac] [WordPress Trac] #15595: add_menu_page position conflict

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 8 17:42:57 UTC 2011


#15595: add_menu_page position conflict
--------------------------+-----------------------------
 Reporter:  vegasgeek     |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Future Release
Component:  Plugins       |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------------

Comment (by aaroncampbell):

 Replying to [comment:11 vegasgeek]:
 > Believe me, I'm with you and would like to see this sorted out. But, if
 you need a quick workaround, instead of using position 3, use position
 3.283764827483 or something similar. Unlikely it will run in to a
 conflict.

 Thanks.  I had tried that and it didn't work.  Explanation:
 {{{
 // Works as mentioned
 add_menu_page('','',  8, '', '', null, '3.1');

 // Ends up in position 3
 add_menu_page('','',  8, '', '', null, 3.1);
 }}}

 The reason is that numeric indices in an array are forced to int
 (truncated, not rounded) but non-numeric indices can be anything.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15595#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list