Changeset 22948 for trunk/wp-admin/network/sites.php
- Timestamp:
- 11/30/2012 01:40:59 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/network/sites.php
r22419 r22948 54 54 if ( 'confirm' === $_GET['action'] ) { 55 55 check_admin_referer( 'confirm' ); 56 56 57 57 if ( ! headers_sent() ) { 58 58 nocache_headers(); … … 73 73 ?> 74 74 </head> 75 <body >75 <body class="wp-core-ui"> 76 76 <h1 id="logo"><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1> 77 77 <form action="sites.php?action=<?php echo esc_attr( $_GET['action2'] ) ?>" method="post"> … … 86 86 </html> 87 87 <?php 88 exit(); 89 } 90 88 exit(); 89 } 90 91 91 $updated_action = ''; 92 92 93 93 $manage_actions = array( 'deleteblog', 'allblogs', 'archiveblog', 'unarchiveblog', 'activateblog', 'deactivateblog', 'unspamblog', 'spamblog', 'unmatureblog', 'matureblog' ); 94 if ( in_array( $_GET['action'], $manage_actions ) ) { 94 if ( in_array( $_GET['action'], $manage_actions ) ) { 95 95 $action = $_GET['action']; 96 96 if ( 'allblogs' === $action ) … … 98 98 99 99 check_admin_referer( $action ); 100 } 101 100 } 101 102 102 switch ( $_GET['action'] ) { 103 103 … … 109 109 if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) { 110 110 wpmu_delete_blog( $id, true ); 111 $updated_action = 'delete'; 111 $updated_action = 'delete'; 112 112 } 113 113 break; … … 116 116 if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) && isset( $_POST['allblogs'] ) ) { 117 117 $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2']; 118 118 119 119 foreach ( (array) $_POST['allblogs'] as $key => $val ) { 120 120 if ( $val != '0' && $val != $current_site->blog_id ) { … … 123 123 if ( ! current_user_can( 'delete_site', $val ) ) 124 124 wp_die( __( 'You are not allowed to delete the site.' ) ); 125 125 126 126 $updated_action = 'all_delete'; 127 127 wpmu_delete_blog( $val, true ); … … 163 163 update_blog_status( $id, 'spam', ( 'spamblog' === $_GET['action'] ) ? '1' : '0' ); 164 164 break; 165 165 166 166 case 'unmatureblog': 167 167 case 'matureblog': … … 169 169 break; 170 170 } 171 171 172 172 if ( empty( $updated_action ) && in_array( $_GET['action'], $manage_actions ) ) 173 173 $updated_action = $_GET['action']; 174 174 175 175 if ( ! empty( $updated_action ) ) { 176 176 wp_safe_redirect( add_query_arg( array( 'updated' => $updated_action ), wp_get_referer() ) ); … … 219 219 break; 220 220 } 221 221 222 222 if ( ! empty( $msg ) ) 223 223 $msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>'; … … 232 232 <?php screen_icon( 'ms-admin' ); ?> 233 233 <h2><?php _e( 'Sites' ) ?> 234 234 235 235 <?php if ( current_user_can( 'create_sites') ) : ?> 236 236 <a href="<?php echo network_admin_url('site-new.php'); ?>" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'site' ); ?></a> … … 242 242 </h2> 243 243 244 <?php echo $msg; ?> 245 244 <?php echo $msg; ?> 245 246 246 <form action="" method="get" id="ms-search"> 247 247 <?php $wp_list_table->search_box( __( 'Search Sites' ), 'site' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.