Ticket #33283: 33283.2.diff
| File 33283.2.diff, 2.1 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/plugins.php
92 92 } 93 93 94 94 if ( empty($plugins) ) { 95 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s ") );95 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s&empty=$action") ); 96 96 exit; 97 97 } 98 98 … … 128 128 else 129 129 $plugins = array(); 130 130 131 if ( empty( $plugins ) ) { 132 wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s&empty=$action" ) ); 133 exit; 134 } 135 131 136 $title = __( 'Update Plugins' ); 132 137 $parent_file = 'plugins.php'; 133 138 … … 206 211 $plugins = array_diff( $plugins, array_filter( $plugins, 'is_plugin_active_for_network' ) ); 207 212 } 208 213 if ( empty($plugins) ) { 209 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s ") );214 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s&empty=$action") ); 210 215 exit; 211 216 } 212 217 … … 236 241 //$_POST = from the plugin form; $_GET = from the FTP details screen. 237 242 $plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array(); 238 243 if ( empty( $plugins ) ) { 239 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s ") );244 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s&empty=$action") ); 240 245 exit; 241 246 } 242 247 … … 504 509 <div id="message" class="updated notice is-dismissible"><p><?php _e('Selected plugins <strong>deactivated</strong>.'); ?></p></div> 505 510 <?php elseif ( 'update-selected' == $action ) : ?> 506 511 <div id="message" class="updated notice is-dismissible"><p><?php _e('All selected plugins are up to date.'); ?></p></div> 512 <?php elseif ( isset($_GET['empty']) ) : 513 $previous_action = str_replace( '-selected', '', $_GET['empty'] ); ?> 514 <div id="message" class="error notice is-dismissible"><p><?php printf( __('Please select one or more plugins to %s.'), $previous_action ); ?></p></div> 507 515 <?php endif; ?> 508 516 509 517 <div class="wrap">