mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
HiDPI versions of the generic menu page icon. props empireoflight, lessbloat. see #21019.
git-svn-id: https://develop.svn.wordpress.org/trunk@22393 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -902,12 +902,15 @@ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $func
|
||||
if ( !empty( $function ) && !empty( $hookname ) && current_user_can( $capability ) )
|
||||
add_action( $hookname, $function );
|
||||
|
||||
if ( empty($icon_url) )
|
||||
$icon_url = esc_url( admin_url( 'images/generic.png' ) );
|
||||
else
|
||||
if ( empty($icon_url) ) {
|
||||
$icon_url = 'none';
|
||||
$icon_class = 'menu-icon-generic ';
|
||||
} else {
|
||||
$icon_url = set_url_scheme( $icon_url );
|
||||
$icon_class = '';
|
||||
}
|
||||
|
||||
$new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
|
||||
$new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $icon_class . $hookname, $hookname, $icon_url );
|
||||
|
||||
if ( null === $position )
|
||||
$menu[] = $new_menu;
|
||||
|
||||
Reference in New Issue
Block a user