Changeset 9537
- Timestamp:
- 11/05/2008 10:46:58 PM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r9411 r9537 558 558 } 559 559 560 function add_object_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') { 561 global $menu, $admin_page_hooks, $_wp_last_object_menu; 562 563 $file = plugin_basename( $file ); 564 565 $admin_page_hooks[$file] = sanitize_title( $menu_title ); 566 567 $hookname = get_plugin_page_hookname( $file, '' ); 568 if (!empty ( $function ) && !empty ( $hookname )) 569 add_action( $hookname, $function ); 570 571 if ( empty($icon_url) ) 572 $icon_url = 'images/menu/generic.png'; 573 574 $menu[$_wp_last_object_menu][4] = ''; // Remove menu-top-last 575 576 $_wp_last_object_menu++; 577 578 $menu[$_wp_last_object_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top-last ' . $hookname, $hookname, $icon_url ); 579 580 return $hookname; 581 } 582 560 583 function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $file, $function = '' ) { 561 584 global $submenu; -
trunk/wp-admin/menu.php
r9474 r9537 54 54 $menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top-last', 'menu-comments', 'images/menu/comments.png' ); 55 55 $submenu['edit-comments.php'][15] = array( __('Comments'), 'edit_posts', 'edit-comments.php' ); 56 57 $_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group 56 58 57 59 $menu[29] = array( '', 'read', '', '', 'wp-menu-separator' );
Note: See TracChangeset
for help on using the changeset viewer.