[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 Apr 26 02:57:36 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:  closed
 Priority:  normal                               |   Milestone:  6.0
Component:  Administration                       |     Version:  4.8
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch dev-feedback needs-        |     Focuses:
  testing has-unit-tests                         |  administration
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53264" 53264]:
 {{{
 #!CommitTicketReference repository="" revision="53264"
 Administration: Trigger a notice for incorrect `add_menu_page()`
 parameter.

 Trigger a notice (via `_doing_it_wrong()`) for developers incorrectly
 setting the position when calling `add_menu_page()`.

 Modify a similar message in `add_submenu_page()` to combine near identical
 strings and match the error description to the conditions in which it is
 called.

 Follow up to [52569], [53104].

 Fixes #40927.
 }}}

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


More information about the wp-trac mailing list