mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Admin menu: add phpdoc/inline comments describing the usage of the param $icon_url in add_menu_page(), add string 'none' to be used when a menu icon is added from CSS, switch core items in the admin menu to use 'none', fixes #21349
git-svn-id: https://develop.svn.wordpress.org/trunk@21877 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -68,8 +68,10 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
|
||||
$id = ! empty( $item[5] ) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
|
||||
$img = '';
|
||||
// if the string 'none' (previously 'div') is passed instead of an URL, don't output the default menu image
|
||||
// so an icon can be added to div.wp-menu-image as background with CSS.
|
||||
if ( ! empty( $item[6] ) )
|
||||
$img = ( 'div' === $item[6] ) ? '<br />' : '<img src="' . $item[6] . '" alt="" />';
|
||||
$img = ( 'none' === $item[6] || 'div' === $item[6] ) ? '<br />' : '<img src="' . $item[6] . '" alt="" />';
|
||||
$arrow = '<div class="wp-menu-arrow"><div></div></div>';
|
||||
|
||||
$title = wptexturize( $item[0] );
|
||||
|
||||
Reference in New Issue
Block a user