Make WordPress Core

Ticket #58361: 58361.diff

File 58361.diff, 817 bytes (added by andrewleap, 18 months ago)

patch

  • wp-admin/menu.php

    diff --git a/wp-admin/menu.php b/wp-admin/menu.php
    index a9853e3969..ddf6cc9ff4 100644
    a b foreach ( array_merge( $builtin, $types ) as $ptype ) { 
    130130        $menu_icon = 'dashicons-admin-post';
    131131        if ( is_string( $ptype_obj->menu_icon ) ) {
    132132                // Special handling for data:image/svg+xml and Dashicons.
    133                 if ( str_starts_with( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' ) || str_starts_with( $ptype_obj->menu_icon, 'dashicons-' ) ) {
     133                if ( 0 === strpos( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' )
     134                || 0 === strpos( $ptype_obj->menu_icon, 'dashicons-' )
     135                || 'div' === $ptype_obj->menu_icon
     136                || 'none' === $ptype_obj->menu_icon ) {
    134137                        $menu_icon = $ptype_obj->menu_icon;
    135138                } else {
    136139                        $menu_icon = esc_url( $ptype_obj->menu_icon );