Changeset 12764
- Timestamp:
- 01/19/2010 06:11:33 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms.php
r12752 r12764 1087 1087 } 1088 1088 1089 function disable_some_pages() {1090 global $messages;1091 1092 if ( strpos( $_SERVER['PHP_SELF'], 'user-new.php' ) && !get_site_option( 'add_new_users' ) ) {1093 if ( is_super_admin() ) {1094 $messages[] = '<div id="message" class="updated fade"><p>' . __( 'Warning! Only site administrators may see this page. Everyone else will see a <em>page disabled</em> message. Enable it again on <a href="ms-options.php#addnewusers">the options page</a>.' ) . '</p></div>';1095 } else {1096 wp_die( __('Page disabled by the administrator') );1097 }1098 }1099 1100 $pages = array( 'theme-editor.php', 'plugin-editor.php' );1101 foreach( $pages as $page ) {1102 if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {1103 wp_die( __('Page disabled by the administrator') );1104 }1105 }1106 1107 $pages = array( 'theme-install.php', 'plugin-install.php' );1108 foreach( $pages as $page ) {1109 if ( strpos( $_SERVER['PHP_SELF'], $page ) && !is_super_admin() ) {1110 wp_die( __( "Sorry, you're not allowed here." ) );1111 }1112 }1113 1114 }1115 add_action( 'admin_init', 'disable_some_pages' );1116 1117 1089 function blogs_listing_post() { 1118 1090 if ( !isset( $_POST[ 'action' ] ) ) { -
trunk/wp-admin/user-new.php
r12752 r12764 12 12 if ( !current_user_can('create_users') ) 13 13 wp_die(__('Cheatin’ uh?')); 14 15 if ( is_multisite() && !get_site_option( 'add_new_users' ) ) 16 wp_die( __('Page disabled by the administrator') ); 14 17 15 18 /** WordPress Registration API */
Note: See TracChangeset
for help on using the changeset viewer.