[wp-trac] [WordPress Trac] #40927: Passing a float as the position in add_menu_page can override other menu items

WordPress Trac noreply at wordpress.org
Tue Jun 6 01:22:31 UTC 2017


#40927: Passing a float as the position in add_menu_page can override other menu
items
----------------------------+------------------------------
 Reporter:  justinbusa      |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  administration
----------------------------+------------------------------
Changes (by dd32):

 * keywords:  has-patch dev-feedback => has-patch
 * component:  Menus => Administration


Comment:

 Previously: #23316

 [attachment:40927.diff] is a bit more WordPress-like version of
 [attachment:plugin.diff].
 I do wonder if we should just do something like this:
 {{{
 if ( ! is_int( $position ) && ! is_string( $position ) ) {
    $position = (string) $position;
 }
 }}}

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


More information about the wp-trac mailing list