Make WordPress Core

Ticket #39351: menu.patch

File menu.patch, 720 bytes (added by mensmaximus, 8 years ago)

Fix for custom post type menu_icon with value 'none' or 'div'

  • wp-admin/menu.php

    old new  
    102102                // Special handling for data:image/svg+xml and Dashicons.
    103103                if ( 0 === strpos( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' ) || 0 === strpos( $ptype_obj->menu_icon, 'dashicons-' ) ) {
    104104                        $menu_icon = $ptype_obj->menu_icon;
     105                // No modification of menu_icon values of custom post types containing 'none' or 'div'
     106                // This is documented in class WP_Post_Type for $menu_icon
     107                } elseif( 'none' == $ptype_obj->menu_icon || 'div' == $ptype_obj->menu_icon ) {
     108                        $menu_icon = $ptype_obj->menu_icon;
    105109                } else {
    106110                        $menu_icon = esc_url( $ptype_obj->menu_icon );
    107111                }