Changeset 14127
- Timestamp:
- 04/18/2010 03:38:47 AM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r14126 r14127 819 819 $hookname = get_plugin_page_hookname( $menu_slug, '' ); 820 820 821 if ( !empty ( $function ) && !empty( $hookname ) && current_user_can( $capability ) )821 if ( !empty( $function ) && !empty( $hookname ) && current_user_can( $capability ) ) 822 822 add_action( $hookname, $function ); 823 823 824 if ( empty($icon_url) ) {824 if ( empty($icon_url) ) 825 825 $icon_url = esc_url( admin_url( 'images/generic.png' ) ); 826 } elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) {826 elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) 827 827 $icon_url = 'https://' . substr($icon_url, 7); 828 } 829 830 $new_menu = array ( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); 831 832 if ( NULL === $position ) { 828 829 $new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); 830 831 if ( null === $position ) 833 832 $menu[] = $new_menu; 834 } else {833 else 835 834 $menu[$position] = $new_menu; 836 }837 835 838 836 $_registered_pages[$hookname] = true; -
trunk/wp-admin/menu-header.php
r13851 r14127 70 70 $toggle = '<div class="wp-menu-toggle"><br /></div>'; 71 71 72 $title = wptexturize($item[0]); 73 72 74 echo "\n\t<li$class$id>"; 73 75 … … 82 84 if ( ( ('index.php' != $submenu[$item[2]][0][2]) && file_exists(WP_PLUGIN_DIR . "/$menu_file") ) || !empty($menu_hook)) { 83 85 $admin_is_parent = true; 84 echo "<div class='wp-menu-image'><a href='admin.php?page={$submenu[$item[2]][0][2]}'>$img</a></div>$toggle<a href='admin.php?page={$submenu[$item[2]][0][2]}'$class$tabindex> {$item[0]}</a>";86 echo "<div class='wp-menu-image'><a href='admin.php?page={$submenu[$item[2]][0][2]}'>$img</a></div>$toggle<a href='admin.php?page={$submenu[$item[2]][0][2]}'$class$tabindex>$title</a>"; 85 87 } else { 86 echo "\n\t<div class='wp-menu-image'><a href='{$submenu[$item[2]][0][2]}'>$img</a></div>$toggle<a href='{$submenu[$item[2]][0][2]}'$class$tabindex> {$item[0]}</a>";88 echo "\n\t<div class='wp-menu-image'><a href='{$submenu[$item[2]][0][2]}'>$img</a></div>$toggle<a href='{$submenu[$item[2]][0][2]}'$class$tabindex>$title</a>"; 87 89 } 88 90 } else if ( current_user_can($item[1]) ) { … … 139 141 $sub_file = substr($sub_file, 0, $pos); 140 142 143 $title = wptexturize($sub_item[0]); 144 141 145 if ( ( ('index.php' != $sub_item[2]) && file_exists(WP_PLUGIN_DIR . "/$sub_file") ) || ! empty($menu_hook) ) { 142 146 // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir … … 146 150 $sub_item_url = add_query_arg( array('page' => $sub_item[2]), 'admin.php' ); 147 151 $sub_item_url = esc_url($sub_item_url); 148 echo "<li$class><a href='$sub_item_url'$class$tabindex> {$sub_item[0]}</a></li>";152 echo "<li$class><a href='$sub_item_url'$class$tabindex>$title</a></li>"; 149 153 } else { 150 echo "<li$class><a href='{$sub_item[2]}'$class$tabindex> {$sub_item[0]}</a></li>";154 echo "<li$class><a href='{$sub_item[2]}'$class$tabindex>$title</a></li>"; 151 155 } 152 156 } -
trunk/wp-admin/menu.php
r14110 r14127 180 180 if ( current_user_can('edit_users') ) { 181 181 $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php. 182 $submenu['users.php'][5] = array(__('Authors & amp;Users'), 'edit_users', 'users.php');182 $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php'); 183 183 $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php'); 184 184
Note: See TracChangeset
for help on using the changeset viewer.