<?php if ( ! defined( 'ABSPATH' ) ) { die( 'Direct access forbidden.' ); }


/**
 * wishbone only works in WordPress 4.4 or later.
 */
if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) {
	require get_template_directory() . '/inc/back-compat.php';
}

/**
 * Theme Includes
 */
require_once( get_template_directory() . '/inc/imageresizer.php' );
require_once( get_template_directory() . '/inc/init.php' );
require_once( get_template_directory() . '/inc/remotefonts.php');
require_once( get_template_directory() . '/inc/features.php' );
require_once( get_template_directory() . '/inc/mega-menu.php' );

/**
 * TGM Plugin Activation
 */
{
	require_once get_template_directory() . '/TGM-Plugin-Activation/class-tgm-plugin-activation.php';

	/** @internal */
	function wishbone_action_theme_register_required_plugins() {
		tgmpa( 
			array(
				array(
					'name'      => esc_html__( 'Unyson', 'jt-wishbone' ),
					'slug'      => 'unyson',
					'required'  => true,
				),
				array(
					'name'      => esc_html__( 'WP Retina 2x', 'jt-wishbone' ),
					'slug'      => 'wp-retina-2x',
					'required'  => false,
				),
				array(
					'name'      => esc_html__( 'WP Instagram Widget', 'jt-wishbone' ),
					'slug'      => 'wp-instagram-widget',
					'required'  => false,
				),
			) 
		);

	}
	add_action( 'tgmpa_register', 'wishbone_action_theme_register_required_plugins' );
}
