Changeset 55672
- Timestamp:
- 04/21/2023 09:48:41 AM (20 months ago)
- Location:
- trunk/src/wp-admin/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network/sites.php
r55418 r55672 103 103 } 104 104 105 if ( get_network()->site_id == $id) {105 if ( is_main_site( $id ) ) { 106 106 wp_die( __( 'Sorry, you are not allowed to change the current site.' ) ); 107 107 } … … 143 143 144 144 $updated_action = 'not_deleted'; 145 if ( '0' != $id && get_network()->site_id != $id&& current_user_can( 'delete_site', $id ) ) {145 if ( '0' != $id && ! is_main_site( $id ) && current_user_can( 'delete_site', $id ) ) { 146 146 wpmu_delete_blog( $id, true ); 147 147 $updated_action = 'delete'; … … 155 155 $site_id = (int) $site_id; 156 156 157 if ( get_network()->site_id == $site_id) {157 if ( is_main_site( $site_id ) ) { 158 158 continue; 159 159 } … … 183 183 184 184 foreach ( (array) $_POST['allblogs'] as $key => $val ) { 185 if ( '0' != $val && get_network()->site_id != $val) {185 if ( '0' != $val && ! is_main_site( $val ) ) { 186 186 switch ( $doaction ) { 187 187 case 'delete': -
trunk/src/wp-admin/network/users.php
r55418 r55672 95 95 96 96 foreach ( (array) $blogs as $details ) { 97 if ( get_network()->site_id != $details->userblog_id ) { // Main blogis not a spam!97 if ( ! is_main_site( $details->userblog_id ) ) { // Main site is not a spam! 98 98 update_blog_status( $details->userblog_id, 'spam', '1' ); 99 99 }
Note: See TracChangeset
for help on using the changeset viewer.