Menu: Continue to use post dashicon as default menu icon.
Prevents a bug where custom post types without a specified menu icon would adopt the menu icon of the preceding post type. Introduced in [33723]. See #16865. Fixes #34637. git-svn-id: https://develop.svn.wordpress.org/trunk@35590 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b31e52a6e8
commit
a6a2159c7d
|
@ -86,6 +86,7 @@ foreach ( array_merge( $builtin, $types ) as $ptype ) {
|
|||
$ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first.
|
||||
$ptype_for_id = sanitize_html_class( $ptype );
|
||||
|
||||
$menu_icon = 'dashicons-admin-post';
|
||||
if ( is_string( $ptype_obj->menu_icon ) ) {
|
||||
// Special handling for data:image/svg+xml and Dashicons.
|
||||
if ( 0 === strpos( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' ) || 0 === strpos( $ptype_obj->menu_icon, 'dashicons-' ) ) {
|
||||
|
|
Loading…
Reference in New Issue