Changeset 12737
- Timestamp:
- 01/16/2010 10:53:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.9/wp-admin/menu.php
r12248 r12737 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.