Changeset 12893
- Timestamp:
- 01/28/2010 10:07:51 PM (15 years ago)
- Location:
- branches/2.8/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.8/wp-admin/includes/plugin.php
r11629 r12893 593 593 594 594 $hookname = get_plugin_page_hookname( $file, '' ); 595 if (!empty ( $function ) && !empty ( $hookname ) )595 if (!empty ( $function ) && !empty ( $hookname ) && current_user_can( $access_level ) ) 596 596 add_action( $hookname, $function ); 597 597 -
branches/2.8/wp-admin/menu.php
r11450 r12893 199 199 // Run re-parent loop again. 200 200 foreach ( $menu as $id => $data ) { 201 if ( ! current_user_can($data[1]) ) 202 $_wp_menu_nopriv[$data[2]] = true; 203 201 204 // If submenu is empty... 202 205 if ( empty($submenu[$data[2]]) ) { 203 206 // And user doesn't have privs, remove menu. 204 if ( ! current_user_can($data[1]) ) { 205 $_wp_menu_nopriv[$data[2]] = true; 207 if ( isset( $_wp_menu_nopriv[$data[2]] ) ) { 206 208 unset($menu[$id]); 207 209 }
Note: See TracChangeset
for help on using the changeset viewer.