Make WordPress Core

Ticket #58361: 58361.3.diff

File 58361.3.diff, 930 bytes (added by ironprogrammer, 13 months ago)

Formatting and comment adjusted for readability.

  • src/wp-admin/menu.php

    diff --git src/wp-admin/menu.php src/wp-admin/menu.php
    index 567af4ae40..ecd14e28f7 100644
    foreach ( array_merge( $builtin, $types ) as $ptype ) { 
    127127
    128128        $menu_icon = 'dashicons-admin-post';
    129129        if ( is_string( $ptype_obj->menu_icon ) ) {
    130                 // Special handling for data:image/svg+xml and Dashicons.
    131                 if ( str_starts_with( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' ) || str_starts_with( $ptype_obj->menu_icon, 'dashicons-' ) ) {
     130                // Special handling for data:image/svg+xml, Dashicons, and empty div.wp-menu-image.
     131                if (
     132                        str_starts_with( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' )
     133                        || str_starts_with( $ptype_obj->menu_icon, 'dashicons-' )
     134                        || 'none' === $ptype_obj->menu_icon
     135                        || 'div' === $ptype_obj->menu_icon
     136                ) {
    132137                        $menu_icon = $ptype_obj->menu_icon;
    133138                } else {
    134139                        $menu_icon = esc_url( $ptype_obj->menu_icon );