* @license GPL-2.0-or-later */ defined( 'ABSPATH' ) || exit; // phpcs:ignore WordPress.Security.NonceVerification.Recommended $wcmq_filter = isset( $_GET['state'] ) ? sanitize_key( wp_unslash( $_GET['state'] ) ) : ''; if ( ! in_array( $wcmq_filter, array( 'pending', 'sending', 'sent', 'failed' ), true ) ) { $wcmq_filter = ''; } $wcmq_paged = Studiou_WCMQ_Admin::current_page(); $wcmq_total = Studiou_WCMQ_DB::count_rows( $wcmq_filter ); $wcmq_offset = ( $wcmq_paged - 1 ) * Studiou_WCMQ_Admin::PER_PAGE; $wcmq_rows = Studiou_WCMQ_DB::get_rows( $wcmq_filter, Studiou_WCMQ_Admin::PER_PAGE, $wcmq_offset ); $wcmq_states = array( '' => __( 'All', 'studiou-wc-mail-queue' ), 'pending' => __( 'Pending', 'studiou-wc-mail-queue' ), 'sending' => __( 'Sending', 'studiou-wc-mail-queue' ), 'sent' => __( 'Sent', 'studiou-wc-mail-queue' ), 'failed' => __( 'Failed', 'studiou-wc-mail-queue' ), ); ?>