LLMS_AJAX::handle()

Handles the AJAX request for my plugin.


Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.ajax.php

	 * @return void
	 */
	public static function handle() {

		// Make sure we are getting a valid AJAX request.
		check_ajax_referer( self::NONCE );

		$request = $_REQUEST;

		$response = call_user_func( 'LLMS_AJAX_Handler::' . $request['action'], $request );

		if ( $response instanceof WP_Error ) {
			self::send_error( $response );
		}

		wp_send_json_success( $response );

		die();


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.