Skip to content

Commit

Permalink
Consolidate if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Viper007Bond committed Dec 7, 2015
1 parent 1c1acba commit 0806fdb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions regenerate-thumbnails.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,13 @@ public function add_bulk_actions_via_javascript() {
* Handles the submission of the new bulk actions entry and redirects to the admin page with the selected attachment IDs.
*/
public function bulk_action_handler() {
if ( empty( $_REQUEST['action'] ) || empty( $_REQUEST['action2'] ) || ( 'bulk_regenerate_thumbnails' != $_REQUEST['action'] && 'bulk_regenerate_thumbnails' != $_REQUEST['action2'] ) ) {
return;
}

if ( empty( $_REQUEST['media'] ) || ! is_array( $_REQUEST['media'] ) ) {
if (
empty( $_REQUEST['action'] ) ||
empty( $_REQUEST['action2'] ) ||
( 'bulk_regenerate_thumbnails' != $_REQUEST['action'] && 'bulk_regenerate_thumbnails' != $_REQUEST['action2'] ) ||
empty( $_REQUEST['media'] ) ||
! is_array( $_REQUEST['media'] )
) {
return;
}

Expand Down

0 comments on commit 0806fdb

Please sign in to comment.