[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
Sat Apr 30 00:50:08 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: reopened
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):
Replying to [comment:39 david.binda]:
> I wonder, is this change intentional?
It is intentional to improve performance. The re-ordered code is pretty
consistently 10 times faster than the old code. See
https://3v4l.org/kaR8b#v7.4.29.
The results do differ but given it's a pseudorandom number seeded by the
hash, I figured it was worth the performance improvement.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40927#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list