acf_is_doing()ACF 5.3.8

acf_is_doing

This function can be used to state what ACF is doing, or to check

No Hooks.

Returns

(true|false).

Usage

acf_is_doing( $event, $context );
$event
.
Default: ''
$context
.
Default: ''

Changelog

Since 5.3.8 Introduced.

acf_is_doing() code ACF 6.8.8

function acf_is_doing( $event = '', $context = '' ) {

	// vars
	$doing = false;

	// task
	if ( acf_get_setting( 'doing' ) === $event ) {
		$doing = true;
	}

	// context
	if ( $context && acf_get_setting( 'doing_context' ) !== $context ) {
		$doing = false;
	}

	// return
	return $doing;
}