Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #58361, comment 3


Ignore:
Timestamp:
10/26/2023 06:52:41 PM (14 months ago)
Author:
andrewleap
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58361, comment 3

    initial v1  
    99> Looking deeper into the intent behind `wp-admin/menu-header.php`'s check for `none` or `div` (see r21877), it seems these values were to be assigned internally by `wp-admin/menu.php` in the case that `menu_icon` was **null**. That behavior has since evolved to [https://developer.wordpress.org/reference/functions/register_post_type/#menu_icon display the default posts icon].
    1010
    11 The intention was to include an icon from Goole material icons via css using by passing the "none" option as documented here: https://developer.wordpress.org/reference/functions/register_post_type/#parameters but it does not work. Rather than emitting and empty div, it emits `<img src="http://none" alt="">`
     11The intention was to include an icon from Goole material icons via css by passing the "none" option as documented here: (see the `menu_icon` parameter) https://developer.wordpress.org/reference/functions/register_post_type/#parameters but it does not work. Rather than emitting and empty div, it emits `<img src="http://none" alt="">`
    1212
    1313This is because `$menu_icon` is escaped with `esc_url`, so when checking to see if it is equal to `'none'`, this check fails