ACF::acf_plugin_activatedpublicACF 6.2.6

Plugin Activation Hook

Method of the class: ACF{}

Hooks from the method

Returns

null. Nothing (null).

Usage

$ACF = new ACF();
$ACF->acf_plugin_activated();

Changelog

Since 6.2.6 Introduced.

ACF::acf_plugin_activated() code ACF 6.8.8

public function acf_plugin_activated() {
	// Set the first activated version of ACF.
	if ( null === get_option( 'acf_first_activated_version', null ) ) {
		// If acf_version is set, this isn't the first activated version, so leave it unset so it's legacy.
		if ( null === get_option( 'acf_version', null ) ) {
			update_option( 'acf_first_activated_version', ACF_VERSION, true );

			do_action( 'acf/first_activated' );
		}
	}

	if ( acf_is_pro() ) {
		do_action( 'acf/activated_pro' );
	}
}