acf_has_done()ACF 5.3.2

acf_has_done

This function will return true if this action has already been done

No Hooks.

Returns

(true|false).

Usage

acf_has_done( $name );
$name(required)
.

Changelog

Since 5.3.2 Introduced.

acf_has_done() code ACF 6.8.8

function acf_has_done( $name ) {

	// return true if already done
	if ( acf_raw_setting( "has_done_{$name}" ) ) {
		return true;
	}

	// update setting and return
	acf_update_setting( "has_done_{$name}", true );
	return false;
}