<?php
/**
 * ファイル読み込み
 *
 * @author     AnimaGate, Inc.
 * @link       https://support.animagate.com/product/wp-nishiki-pro/
 */

// Utility
require_once 'extension/class/utility/class-utility-form.php';
require_once 'extension/class/utility/class-utility.php';

// Init
require_once 'library/init.php';

// Extension
require_once 'extension/init.php';

// Customizer
require_once 'library/customizer/init.php';

// Comment
require_once 'library/comment.php';

// Script
require_once 'library/script.php';

// Theme About Page
require_once 'library/about.php';

// Block Editor
require_once 'library/block-editor.php';

$reg_key_data = get_option( 'nishiki_pro' );
$reg_key      = isset( $reg_key_data['reg_key'] ) ? $reg_key_data['reg_key'] : '';

use YahnisElsts\PluginUpdateChecker\v5\PucFactory;

if ( isset( $reg_key ) && ! empty( $reg_key ) ) {

	require 'extension/update/plugin-update-checker.php';

	$myUpdateChecker = PucFactory::buildUpdateChecker(
		'https://support.animagate.com/wp/packages/nishiki-pro/nishiki-pro.json',
		__FILE__,
		'nishiki-pro'
	);
}
