- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-includes/capabilities.php
r16631 r15403 799 799 case 'remove_user': 800 800 $caps[] = 'remove_users'; 801 break; 802 case 'delete_user': 803 $caps[] = 'delete_users'; 801 804 break; 802 805 case 'promote_user': … … 810 813 case 'edit_users': 811 814 // If multisite these caps are allowed only for super admins. 812 if ( is_multisite() && !is_super_admin( $user_id) )815 if ( is_multisite() && !is_super_admin() ) 813 816 $caps[] = 'do_not_allow'; 814 817 else … … 989 992 break; 990 993 case 'unfiltered_upload': 991 if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id) ) )994 if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin() ) ) 992 995 $caps[] = $cap; 993 996 else … … 1026 1029 case 'delete_users': 1027 1030 // If multisite these caps are allowed only for super admins. 1028 if ( is_multisite() && !is_super_admin( $user_id ) ) {1031 if ( is_multisite() && !is_super_admin() ) 1029 1032 $caps[] = 'do_not_allow'; 1030 } else { 1031 if ( 'delete_user' == $cap ) 1032 $cap = 'delete_users'; 1033 else 1033 1034 $caps[] = $cap; 1034 }1035 1035 break; 1036 1036 case 'create_users': … … 1080 1080 $current_user = wp_get_current_user(); 1081 1081 1082 if ( is_multisite() && is_super_admin() ) 1083 return true; 1084 1082 1085 if ( empty( $current_user ) ) 1083 1086 return false;
Note: See TracChangeset
for help on using the changeset viewer.