Ajax::__construct()


Source

File: classes/Ajax.php

	public function __construct() {
		//Saving option
		add_action( 'wp_ajax_dozent_option_save', [ $this, 'dozent_option_save' ] );
		//Search Instructor
		add_action( 'wp_ajax_dozent_search_instructor', [ $this, 'dozent_search_instructor' ] );
		//Add Instructor
		add_action( 'wp_ajax_dozent_add_instructors', [ $this, 'dozent_add_instructors' ] );
		//Detach an instructor
		add_action( 'wp_ajax_dozent_detach_instructor', [ $this, 'dozent_detach_instructor' ] );

		//Create or Update Review
		add_action( 'wp_ajax_dozent_save_review', [ $this, 'dozent_save_review' ] );

		add_action( 'wp_ajax_dozent_load_more_reviews', [ $this, 'dozent_load_more_reviews' ] );
		add_action( 'wp_ajax_nopriv_dozent_load_more_reviews', [ $this, 'dozent_load_more_reviews' ] );

		add_action( 'wp_ajax_dozent_search_reviews', [ $this, 'dozent_search_reviews' ] );
		add_action( 'wp_ajax_nopriv_dozent_search_reviews', [ $this, 'dozent_search_reviews' ] );

		//Update review from dashboard
		add_action( 'wp_ajax_open_review_update_modal', [ $this, 'open_review_update_modal' ] );

	}