WordPress.org

Make WordPress Core

Ticket #39186: 39186.patch

File 39186.patch, 1.0 KB (added by chris_dev, 3 years ago)

Add name attribute to Apply button and check where the action is coming from

  • wp-admin/includes/class-wp-list-table.php

     
    470470
    471471                echo "</select>\n";
    472472
    473                 submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
     473                submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two", 'name' => "doaction$two" ) );
    474474                echo "\n";
    475475        }
    476476
     
    486486                if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) )
    487487                        return false;
    488488
    489                 if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
     489                if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] && isset($_REQUEST['doaction']) )
    490490                        return $_REQUEST['action'];
    491491
    492                 if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
     492                if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] && isset($_REQUEST['doaction2']) )
    493493                        return $_REQUEST['action2'];
    494494
    495495                return false;