public/wordpress/wp-content/plugins/wp-courseware/includes/core/ajax.php
/**
	 * Check for Ajax Request and Dispatch Action.
	 *
	 * @since 4.3.0
	 */
Check for Ajax Request and Dispatch Action.
Check for Ajax Request and Dispatch Action .
public function do_ajax() {
		global $wp_query;
		if ( ! empty( $_GET['wpcw-ajax'] ) ) {
			$wp_query->set( 'wpcw-ajax', sanitize_text_field( $_GET['wpcw-ajax'] ) );
		}
		if ( $action = $wp_query->get( 'wpcw-ajax' ) ) {
			$this->ajax_headers();
			do_action( 'wpcw_ajax_' . sanitize_text_field( $action ) );
			wp_die();
		}
	}
public function do_ajax ( ) { global $ wp_query ; if ( ! empty ( $ _GET [ 'wpcw-ajax' ] ) ) { $ wp_query -> set ( 'wpcw-ajax' , sanitize_text_field ( $ _GET [ 'wpcw-ajax' ] ) ) ; } if ( $ action = $ wp_query -> get ( 'wpcw-ajax' ) ) { $ this -> ajax_headers ( ) ; do_action ( 'wpcw_ajax_' . sanitize_text_field ( $ action ) ) ; wp_die ( ) ; } }
Check for Ajax Request and Dispatch Action.
Check for Ajax Request and Dispatch Action .