Changeset 43381
- Timestamp:
- 06/26/2018 03:04:26 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/dashboard.php
r43174 r43381 38 38 // PHP Version. 39 39 $response = wp_check_php_version(); 40 if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'up grade_php' ) ) {40 if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'update_php' ) ) { 41 41 add_filter( 'postbox_classes_dashboard_dashboard_php_nag', 'dashboard_php_nag_class' ); 42 42 wp_add_dashboard_widget( 'dashboard_php_nag', __( 'PHP Update Required' ), 'wp_dashboard_php_nag' ); -
trunk/src/wp-includes/capabilities.php
r43378 r43381 555 555 } 556 556 break; 557 case 'up grade_php':557 case 'update_php': 558 558 if ( is_multisite() && ! is_super_admin( $user_id ) ) { 559 559 $caps[] = 'do_not_allow'; -
trunk/tests/phpunit/tests/user/capabilities.php
r43155 r43381 218 218 final private function _getSingleSiteMetaCaps() { 219 219 return array( 220 'create_sites' => array(),221 'delete_sites' => array(),222 'manage_network' => array(),223 'manage_sites' => array(),224 'manage_network_users' => array(),225 'manage_network_plugins' => array(),226 'manage_network_themes' => array(),227 'manage_network_options' => array(),228 'delete_site' => array(),229 'upgrade_network' => array(),230 231 'setup_network' => array( 'administrator' ),232 'upload_plugins' => array( 'administrator' ),233 'upload_themes' => array( 'administrator' ),234 'customize' => array( 'administrator' ),235 'add_users' => array( 'administrator' ),236 'install_languages' => array( 'administrator' ),237 'update_languages' => array( 'administrator' ),238 'deactivate_plugins' => array( 'administrator' ),239 'up grade_php'=> array( 'administrator' ),220 'create_sites' => array(), 221 'delete_sites' => array(), 222 'manage_network' => array(), 223 'manage_sites' => array(), 224 'manage_network_users' => array(), 225 'manage_network_plugins' => array(), 226 'manage_network_themes' => array(), 227 'manage_network_options' => array(), 228 'delete_site' => array(), 229 'upgrade_network' => array(), 230 231 'setup_network' => array( 'administrator' ), 232 'upload_plugins' => array( 'administrator' ), 233 'upload_themes' => array( 'administrator' ), 234 'customize' => array( 'administrator' ), 235 'add_users' => array( 'administrator' ), 236 'install_languages' => array( 'administrator' ), 237 'update_languages' => array( 'administrator' ), 238 'deactivate_plugins' => array( 'administrator' ), 239 'update_php' => array( 'administrator' ), 240 240 'export_others_personal_data' => array( 'administrator' ), 241 241 'erase_others_personal_data' => array( 'administrator' ), 242 242 'manage_privacy_options' => array( 'administrator' ), 243 243 244 'edit_categories' => array( 'administrator', 'editor' ),245 'delete_categories' => array( 'administrator', 'editor' ),246 'manage_post_tags' => array( 'administrator', 'editor' ),247 'edit_post_tags' => array( 'administrator', 'editor' ),248 'delete_post_tags' => array( 'administrator', 'editor' ),249 'edit_css' => array( 'administrator', 'editor' ),250 251 'assign_categories' => array( 'administrator', 'editor', 'author', 'contributor' ),252 'assign_post_tags' => array( 'administrator', 'editor', 'author', 'contributor' ),244 'edit_categories' => array( 'administrator', 'editor' ), 245 'delete_categories' => array( 'administrator', 'editor' ), 246 'manage_post_tags' => array( 'administrator', 'editor' ), 247 'edit_post_tags' => array( 'administrator', 'editor' ), 248 'delete_post_tags' => array( 'administrator', 'editor' ), 249 'edit_css' => array( 'administrator', 'editor' ), 250 251 'assign_categories' => array( 'administrator', 'editor', 'author', 'contributor' ), 252 'assign_post_tags' => array( 'administrator', 'editor', 'author', 'contributor' ), 253 253 ); 254 254 } … … 256 256 final private function _getMultiSiteMetaCaps() { 257 257 return array( 258 'create_sites' => array(),259 'delete_sites' => array(),260 'manage_network' => array(),261 'manage_sites' => array(),262 'manage_network_users' => array(),263 'manage_network_plugins' => array(),264 'manage_network_themes' => array(),265 'manage_network_options' => array(),266 'setup_network' => array(),267 'upload_plugins' => array(),268 'upload_themes' => array(),269 'edit_css' => array(),270 'upgrade_network' => array(),271 'install_languages' => array(),272 'update_languages' => array(),273 'deactivate_plugins' => array(),274 'up grade_php'=> array(),258 'create_sites' => array(), 259 'delete_sites' => array(), 260 'manage_network' => array(), 261 'manage_sites' => array(), 262 'manage_network_users' => array(), 263 'manage_network_plugins' => array(), 264 'manage_network_themes' => array(), 265 'manage_network_options' => array(), 266 'setup_network' => array(), 267 'upload_plugins' => array(), 268 'upload_themes' => array(), 269 'edit_css' => array(), 270 'upgrade_network' => array(), 271 'install_languages' => array(), 272 'update_languages' => array(), 273 'deactivate_plugins' => array(), 274 'update_php' => array(), 275 275 'export_others_personal_data' => array( '' ), 276 276 'erase_others_personal_data' => array( '' ), 277 'manage_privacy_options' 278 279 'customize' => array( 'administrator' ),280 'delete_site' => array( 'administrator' ),281 'add_users' => array( 'administrator' ),282 283 'edit_categories' => array( 'administrator', 'editor' ),284 'delete_categories' => array( 'administrator', 'editor' ),285 'manage_post_tags' => array( 'administrator', 'editor' ),286 'edit_post_tags' => array( 'administrator', 'editor' ),287 'delete_post_tags' => array( 'administrator', 'editor' ),288 289 'assign_categories' => array( 'administrator', 'editor', 'author', 'contributor' ),290 'assign_post_tags' => array( 'administrator', 'editor', 'author', 'contributor' ),277 'manage_privacy_options' => array(), 278 279 'customize' => array( 'administrator' ), 280 'delete_site' => array( 'administrator' ), 281 'add_users' => array( 'administrator' ), 282 283 'edit_categories' => array( 'administrator', 'editor' ), 284 'delete_categories' => array( 'administrator', 'editor' ), 285 'manage_post_tags' => array( 'administrator', 'editor' ), 286 'edit_post_tags' => array( 'administrator', 'editor' ), 287 'delete_post_tags' => array( 'administrator', 'editor' ), 288 289 'assign_categories' => array( 'administrator', 'editor', 'author', 'contributor' ), 290 'assign_post_tags' => array( 'administrator', 'editor', 'author', 'contributor' ), 291 291 ); 292 292 }
Note: See TracChangeset
for help on using the changeset viewer.