[wp-trac] [WordPress Trac] #34637: CPT menu icon leakage
WordPress Trac
noreply at wordpress.org
Mon Nov 9 17:22:24 UTC 2015
#34637: CPT menu icon leakage
--------------------------+-----------------------
Reporter: obenland | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4
Component: Menus | Version:
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------
When a Custom Post Type (CPT) that doesn't define `menu_icon` happens to
be registered after a CPT that does define `menu_icon`, that icon will
then be attached to both.
In `wp-admin/menu.php` we loop through all post types and check if the
`menu_icon` property is a string, and if it's not, if the post type is
built-in, to define the `$menu_icon` variable. If that is both not true
(like when `menu_icon` was never set), `$menu_icon` stays unchanged from
the previous loop.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34637>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list