<?php
/**
 * This is the main theme function
 * @package fastx
 * @since v1.0.0
*/

if ( !defined( 'FASTX_VER' ) ) {
	define( 'FASTX_VER', '1.0.2' );
}
if ( !defined( 'FASTX_DIR' ) ) {
	define('FASTX_DIR', get_template_directory_uri());
}
if ( !defined( 'FASTX_PATH' ) ) {
	define('FASTX_PATH', get_template_directory());
}


if (!class_exists( 'FASTX_Admin_Notice' )) {
    require_once FASTX_PATH . '/classes/AdminNotice.php';
    new \FASTX\FASTX_Admin_Notice();
}

// Theme Initialization file
if (!class_exists( 'FASTX_Initialization' )) {
    require_once FASTX_PATH . '/classes/Initialization.php';
    new \FASTX\FASTX_Initialization();
}


/**
 * @package    TGM-Plugin-Activation
 * @subpackage Example
 * @version    2.6.1 for parent theme Fastx
 * @author     Thomas Griffin, Gary Jones, Juliette Reinders Folmer
 * @copyright  Copyright (c) 2011, Thomas Griffin
 * @license    http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
 * @link       https://github.com/TGMPA/TGM-Plugin-Activation
*/
require_once FASTX_PATH . '/classes/tgm/class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'fastx_register_required_plugins' );
function fastx_register_required_plugins() {
	
	$plugins = array(

		array(
            'name'                  => esc_html__( 'PostX', 'fastx' ),
            'slug'                  => 'ultimate-post',
            'required'              => false,
        ),
	);
	$config = array(
		'id'           => 'fastx',                
		'default_path' => '',                     
		'menu'         => 'tgmpa-install-plugins',
		'parent_slug'  => 'themes.php',           
		'capability'   => 'edit_theme_options',   
		'has_notices'  => true,                   
		'dismissable'  => true,                   
		'dismiss_msg'  => '',                     
		'is_automatic' => false,                  
		'message'      => '',                     
	);

	tgmpa( $plugins, $config );
}