Automator_Load::initialize_automator_db()

Initialize static singleton class that configures all constants, utilities variables and handles activation/deactivation


Source Source

File: src/class-automator-load.php

	public function initialize_automator_db() {
		include_once dirname( AUTOMATOR_BASE_FILE ) . '/src/core/class-automator-db.php';
		$config_instance = Automator_DB::get_instance();
		register_activation_hook(
			AUTOMATOR_BASE_FILE,
			array(
				Automator_DB::class,
				'activation',
			)
		);
		$db_version = get_option( 'uap_database_version', null );
		if ( null === $db_version || (string) AUTOMATOR_DATABASE_VERSION !== (string) $db_version ) {
			$config_instance->activation();
			$config_instance->mysql_8_auto_increment_fix();
		}
		if ( (string) AUTOMATOR_DATABASE_VIEWS_VERSION !== (string) get_option( 'uap_database_views_version', 0 ) ) {
			$config_instance->automator_generate_views();
		}
	}

Changelog Changelog

Changelog
VersionDescription
1.0.0Introduced.