InstructorsList::process_bulk_action()


Source

File: classes/InstructorsList.php

	function process_bulk_action() {
		if ( 'approve' === $this->current_action() ) {
			$instructor_id = (int) dozent_input_text( 'instructor' );
			dozent_instructor_approve( $instructor_id );
		}

		if ( 'blocked' === $this->current_action() ) {
			$instructor_id = (int) sanitize_text_field( $_GET['instructor'] );

			dozent_instructor_block( $instructor_id );
		}

		//Detect when a bulk action is being triggered...
		if ( 'delete' === $this->current_action() ) {
			wp_die( 'Items deleted (or they would be if we had items to delete)!' );
		}
	}