<?php

namespace EasyContentManager;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Migration {
	public static function init() {
		$self = new self();
		$self->maybe_run_installation();
	}

	public function maybe_run_installation() {
		if ( empty( get_option( EASY_CONTENT_MANAGER_SETTINGS_NAME ) ) ) {
			if ( class_exists( 'EasyContentManager\\Installer' ) ) {
				$installer = new \EasyContentManager\Installer();
				$installer->save_main_settings();
			}
		}
	}
}
