[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
Fri Apr 8 06:15:16 UTC 2022


#40927: Passing a float as the position in add_menu_page can override other menu
items
-------------------------------------------------+-------------------------
 Reporter:  justinbusa                           |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  6.0
Component:  Administration                       |     Version:  4.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-        |     Focuses:
  testing has-unit-tests                         |  administration
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 In [changeset:"53104" 53104]:
 {{{
 #!CommitTicketReference repository="" revision="53104"
 Administration: Allow floats for menu positions.

 Permit plugin authors to pass the menu position as a float in
 `add_menu_page()` and `add_submenu_page()`. This allows for a common
 practice within major plugins to avoid menu collisions by passing a float.

 Follow up to [52569].

 Props justinbusa, dd32, welcher, SergeyBiryukov, kirtan95, audrasjb, Cybr,
 chaion07, costdev, peterwilsoncc.
 See #40927.
 }}}

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


More information about the wp-trac mailing list