WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/15/2008 06:54:25 AM (13 years ago)
Author:
azaozz
Message:

Admin menu: add generic icon, fix hover in IE, speed up response timing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r9178 r9182  
    493493//
    494494
    495 function add_menu_page( $page_title, $menu_title, $access_level, $file, $function = '' ) {
     495function add_menu_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '' ) {
    496496    global $menu, $admin_page_hooks;
    497497
     
    504504        add_action( $hookname, $function );
    505505
    506     $menu[] = array ( $menu_title, $access_level, $file, $page_title, $hookname, $hookname );
     506    if ( empty($icon_url) )
     507        $icon_url = 'images/menu/generic.png';
     508   
     509    $menu[] = array ( $menu_title, $access_level, $file, $page_title, $hookname, $hookname, $icon_url );
    507510
    508511    return $hookname;
Note: See TracChangeset for help on using the changeset viewer.