diff --git src/wp-admin/menu.php src/wp-admin/menu.php
index 567af4ae40..ecd14e28f7 100644
|
|
foreach ( array_merge( $builtin, $types ) as $ptype ) { |
127 | 127 | |
128 | 128 | $menu_icon = 'dashicons-admin-post'; |
129 | 129 | 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 | ) { |
132 | 137 | $menu_icon = $ptype_obj->menu_icon; |
133 | 138 | } else { |
134 | 139 | $menu_icon = esc_url( $ptype_obj->menu_icon ); |