ActionScheduler_Abstract_ListTable::process_bulk_action() – Checks if the current request has a bulk action. If that is the case it will validate and will execute the bulk method handler. Regardless if the action is valid or not it will redirect to the previous page removing the current arguments that makes this request a bulk action.

You appear to be a bot. Output may be restricted

Description

Checks if the current request has a bulk action. If that is the case it will validate and will execute the bulk method handler. Regardless if the action is valid or not it will redirect to the previous page removing the current arguments that makes this request a bulk action.

Usage

ActionScheduler_Abstract_ListTable::process_bulk_action();

Parameters

Returns

void

Source

File name: woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php
Lines:

1 to 22 of 22
  protected function process_bulk_action() {
    global $wpdb;
    // Detect when a bulk action is being triggered.
    $action = $this->current_action();
    if ( ! $action ) {
      return;
    }

    check_admin_referer( 'bulk-' . $this->_args['plural'] );

    $method   = 'bulk_' . $action;
    if ( array_key_exists( $action, $this->bulk_actions ) && is_callable( array( $this, $method ) ) && ! empty( $_GET['ID'] ) && is_array( $_GET['ID'] ) ) {
      $ids_sql = '(' . implode( ',', array_fill( 0, count( $_GET['ID'] ), '%s' ) ) . ')';
      $this->$method( $_GET['ID'], $wpdb->prepare( $ids_sql, $_GET['ID'] ) );
    }

    wp_redirect( remove_query_arg(
      array( '_wp_http_referer', '_wpnonce', 'ID', 'action', 'action2' ),
      wp_unslash( $_SERVER['REQUEST_URI'] )
    ) );
    exit;
  }
 

 View on GitHub View on Trac