ActionScheduler_Abstract_ListTable::extra_tablenav()
Display the table.
Method of the class: ActionScheduler_Abstract_ListTable{}
No Hooks.
Return
null
. Nothing (null).
Usage
$ActionScheduler_Abstract_ListTable = new ActionScheduler_Abstract_ListTable(); $ActionScheduler_Abstract_ListTable->extra_tablenav( $which );
- $which(string) (required)
- The name of the table.
ActionScheduler_Abstract_ListTable::extra_tablenav() ActionScheduler Abstract ListTable::extra tablenav code WC 9.5.1
public function extra_tablenav( $which ) { if ( ! $this->filter_by || 'top' !== $which ) { return; } echo '<div class="alignleft actions">'; foreach ( $this->filter_by as $id => $options ) { $default = ! empty( $_GET['filter_by'][ $id ] ) ? sanitize_text_field( wp_unslash( $_GET['filter_by'][ $id ] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( empty( $options[ $default ] ) ) { $default = ''; } echo '<select name="filter_by[' . esc_attr( $id ) . ']" class="first" id="filter-by-' . esc_attr( $id ) . '">'; foreach ( $options as $value => $label ) { echo '<option value="' . esc_attr( $value ) . '" ' . esc_html( $value === $default ? 'selected' : '' ) . '>' . esc_html( $label ) . '</option>'; } echo '</select>'; } submit_button( esc_html__( 'Filter', 'woocommerce' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); echo '</div>'; }