Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin

Table::display_tablenav()protectedWC 1.0

Generate the table navigation above or below the table. Included to remove extra nonce input.

Method of the class: Table{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->display_tablenav( $which );
$which(string) (required)
The location of the extra table nav markup: 'top' or 'bottom'.

Table::display_tablenav() code WC 7.1.0

protected function display_tablenav( $which ) {
	$directories = wc_get_container()->get( Register::class );
	echo '<div class="tablenav ' . esc_attr( $which ) . '">';

	if ( $this->has_items() ) {
		echo '<div class="alignleft actions bulkactions">';
		$this->bulk_actions( $which );

		if ( $directories->count( false ) > 0 ) {
			echo '<a href="' . esc_url( $this->get_action_url( 'enable-all', 0 ) ) . '" class="wp-core-ui button">' . esc_html_x( 'Enable All', 'Approved product download directories', 'woocommerce' ) . '</a> ';
		}

		if ( $directories->count( true ) > 0 ) {
			echo '<a href="' . esc_url( $this->get_action_url( 'disable-all', 0 ) ) . '" class="wp-core-ui button">' . esc_html_x( 'Disable All', 'Approved product download directories', 'woocommerce' ) . '</a>';
		}

		echo '</div>';
	}

	$this->pagination( $which );
	echo '<br class="clear" />';
	echo '</div>';
}