ap_is_ajax()

Description #

Check if doing ajax request.

Changelog #

VersionDescription
3.0.0Check if ap_ajax_action is set.
2.0.1Introduced.

Source #

File: includes/functions.php

function ap_is_ajax() {
	if ( defined( 'DOING_AJAX' ) && DOING_AJAX && ap_sanitize_unslash( 'ap_ajax_action', 'request', false ) ) {
		return true;
	}

	return false;
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment