<?php
/**
 * The file that defines the core plugin class
 *
 * A class definition that includes attributes and functions used across both the
 * public-facing side of the site and the admin area.
 *
 * @link       https://www.facebook.com/nikita.flo.735
 * @since      1.0.0
 *
 * @package    FLO_INIT_TAXONOMY
 */

/**
 * The core plugin class.
 *
 * This is used to define internationalization, admin-specific hooks, and
 * public-facing site hooks.
 *
 * Also maintains the unique identifier of this plugin as well as the current
 * version of the plugin.
 *
 * @since      1.0.0
 * @package    FLO_INIT_TAXONOMY
 * @author     Nichita Sinitin <nikita@flosites.net>
 */
class FLO_INIT_TAXONOMY
{
	/**
	 * The unique identifier of this plugin.
	 *
	 * @since    1.0.0
	 * @access   protected
	 * @var      string    $theme_name    The string used to uniquely identify this plugin.
	 */
	protected $theme_name;

	/**
	 * The current version of the plugin.
	 *
	 * @since    1.0.0
	 * @access   protected
	 * @var      string    $version    The current version of the plugin.
	 */
	protected $version;

	/**
	 * Define the core functionality of the plugin.
	 *
	 * Set the plugin name and the plugin version that can be used throughout the plugin.
	 * Load the dependencies, define the locale, and set the hooks for the admin area and
	 * the public-facing side of the site.
	 *
	 * @since    1.0.0
	 */
	public function __construct()
	{
		if (defined('FLEX_GUTENBERG_THEME_VERSION')) {
			$this->version = FLEX_GUTENBERG_THEME_VERSION;
		} else {
			$this->version = '1.0.0';
		}

		add_action('init', array($this, 'flo_register_taxonomy'));
	}

	public function flo_register_taxonomy()
	{
		include dirname(__FILE__) . '/configs/taxonomies-config.php';

		foreach ($taxonomies_arr as $key => $taxonomy_config) {
			register_taxonomy($key, $taxonomy_config['supported_post_types'], $taxonomy_config['taxonomy_options']);
		}
	}
}

new FLO_INIT_TAXONOMY();
