ACF::acf_plugin_activatedpublicACF 6.2.6

Plugin Activation Hook

Метод класса: ACF{}

Хуки из метода

Возвращает

null. Ничего (null).

Использование

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

Список изменений

С версии 6.2.6 Введена.

Код ACF::acf_plugin_activated() ACF 6.4.2

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' );
	}
}