Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin

UI::process_actions()privateWC 1.0

Process bulk and single-row actions.

{} Это метод класса: UI{}

Хуков нет.

Возвращает

null. Ничего.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->process_actions();

Код UI::process_actions() WC 6.8.0

private function process_actions() {
	// phpcs:disable WordPress.Security.NonceVerification.Recommended
	$ids = isset( $_REQUEST['url'] ) ? array_map( 'absint', (array) $_REQUEST['url'] ) : array();

	if ( empty( $ids ) || empty( $_REQUEST['action'] ) ) {
		return;
	}

	$this->security_check();

	$action = sanitize_text_field( wp_unslash( $_REQUEST['action'] ) );

	switch ( $action ) {
		case 'edit':
			$this->process_edits( current( $ids ) );
			break;

		case 'delete':
		case 'enable':
		case 'disable':
			$this->process_bulk_actions( $ids, $action );
			break;

		case 'enable-all':
		case 'disable-all':
			$this->process_all_actions( $action );
			break;

		case 'turn-on':
		case 'turn-off':
			$this->process_on_off( $action );
			break;
	}
	// phpcs:enable
}