<?php

add_action( 'admin_menu', 'gym_training_coach_gettingstarted' );
function gym_training_coach_gettingstarted() {
	add_theme_page( esc_html__('About Theme', 'gym-training-coach'), esc_html__('Theme Demo Import', 'gym-training-coach'), 'edit_theme_options', 'gym-training-coach-guide-page', 'gym_training_coach_guide');
}

function gym_training_coach_admin_theme_style() {
   wp_enqueue_style('gym-training-coach-custom-admin-style', esc_url(get_template_directory_uri()) . '/inc/dashboard/get_started_info.css');
   wp_enqueue_script('gym-training-coach-tab', esc_url( get_template_directory_uri() ) . '/inc/dashboard/js/get_started_tab.js');
   wp_enqueue_script('gym-training-coach-bundle-banner', get_template_directory_uri() . '/inc/dashboard/js/bundle_banner.js', array(), false, true);

    // Admin notice code START
	wp_register_script('gym-training-coach-notice', esc_url(get_template_directory_uri()) . '/inc/dashboard/js/notice.js', array('jquery'), time(), true);
	wp_enqueue_script('gym-training-coach-notice');
	// Admin notice code END
}
add_action('admin_enqueue_scripts', 'gym_training_coach_admin_theme_style');

// Notice after Theme Activation
add_action('admin_notices', 'gym_training_coach_activation_notice');

function gym_training_coach_activation_notice() {
    // Hide permanently if dismissed
    if ( get_option('gym_training_coach_admin_notice') == 1 ) {
        return;
    }
    // Hide ONLY on Get Started page
    if ( isset($_GET['page']) && $_GET['page'] === 'gym-training-coach-guide-page' ) {
        return;
    }?>      
        <div id="gym-training-coach-welcome-notice" class="notice notice-success is-dismissible getting_started activation-notice	">
            <div class="notice-info-row">
                <div class="notice-image">
                    <img style="width: 100%;max-width: 320px;line-height: 40px;display: inline-block;vertical-align: top;" src="<?php echo esc_url( get_stylesheet_directory_uri() . '/screenshot.png' ); ?>" />
                </div>
                <div class="notice-content">
                    <h2><?php esc_html_e( 'Thanks For Installing Gym Training Coach, You Rock!', 'gym-training-coach' ); ?></h2>
                    <p><?php esc_html_e( 'Take benefit of a variety of features, functionalities, elements, and an exclusive set of customization options to build your own professional store website. Please click the link below for theme setup details.', 'gym-training-coach' ); ?></p>
                    <div style="display: grid;">
                        <a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=gym-training-coach-guide-page' ) ); ?>">
                            <?php esc_html_e( 'Getting Started', 'gym-training-coach' ); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( GYM_TRAINING_COACH_BUY_BUNDLE ); ?>"><?php esc_html_e('Get Bundle', 'gym-training-coach') ?></a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( GYM_TRAINING_COACH_LIVE_DEMO ); ?>">
                            <?php esc_html_e('Pro Demo', 'gym-training-coach'); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( GYM_TRAINING_COACH_FREE_DOC ); ?>">
                            <?php esc_html_e('Free Doc', 'gym-training-coach'); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( GYM_TRAINING_COACH_BUY_PRO ); ?>">
                            <?php esc_html_e('Upgrade To Pro', 'gym-training-coach'); ?>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    <?php 
}

//Hook (VERY IMPORTANT)
add_action('admin_notices', 'gym_training_coach_activation_notice');

// Admin notice code START
add_action('wp_ajax_gym_training_coach_dismiss_notice', 'gym_training_coach_dismiss_notice');
function gym_training_coach_dismiss_notice() {
    update_option('gym_training_coach_admin_notice', 1);
    wp_die();
}

//After Switch theme function
add_action('after_switch_theme', 'gym_training_coach_getstart_setup_options');
function gym_training_coach_getstart_setup_options () {
    delete_option('gym_training_coach_admin_notice');
}
// Admin notice code END

/**
 * Theme Info Page
 */
function gym_training_coach_guide() {

	// Theme info
	$gym_training_coach_return = add_query_arg( array()) ;
	$gym_training_coach_theme = wp_get_theme( 'gym-training-coach' ); ?>

	<div class="wrap getting-started">
		<div class="getting-started__header">
		    <div>
                <h2 class="tgmpa-notice-warning"></h2>
            </div>
		</div>
		<div class="tab-sec">
			<div class="bwp-bundle-banner">
				<div class="bwp-bundle-banner__row">
					<div class="bwp-bundle-banner__content">
						<span class="bwp-bundle-banner__badge"><?php esc_html_e( 'Limited Time Deal - 25% Off', 'gym-training-coach' ); ?></span>
						<h2 class="bwp-bundle-banner__title"><?php esc_html_e( '250+ Premium WordPress Themes in One Bundle', 'gym-training-coach' ); ?></h2>
						<p class="bwp-bundle-banner__desc">
							<strong><?php esc_html_e( 'SUMMER SALE!', 'gym-training-coach' ); ?></strong>
							<?php esc_html_e( 'Get 15% off on a Bundle of 250+ Premium WP Themes. Use', 'gym-training-coach' ); ?>
							<span class="bwp-bundle-banner__coupon-inline">&quot;SUMMER15&quot;</span>
							<?php esc_html_e( 'at Checkout.', 'gym-training-coach' ); ?>
						</p>
						<div class="bwp-bundle-banner__actions">
							<a class="bwp-bundle-banner__cta" target="_blank" href="<?php echo esc_url( GYM_TRAINING_COACH_BUY_BUNDLE ); ?>"><?php esc_html_e( 'Get Bundle Just at $99', 'gym-training-coach' ); ?><span class="dashicons dashicons-arrow-right-alt2"></span></a>
							<button type="button" class="bwp-bundle-banner__coupon" id="bwp-copy-coupon" data-coupon="SUMMER15" aria-label="<?php echo esc_attr__( 'Copy coupon code SUMMER15', 'gym-training-coach' ); ?>">
								<span class="bwp-bundle-banner__coupon-label"><?php esc_html_e( 'Coupon Code', 'gym-training-coach' ); ?></span>
								<span class="bwp-bundle-banner__coupon-code">SUMMER15</span>
								<span class="bwp-bundle-banner__coupon-copied" id="bwp-copy-coupon-msg"><?php esc_html_e( 'Copied!', 'gym-training-coach' ); ?></span>
							</button>
						</div>
					</div>
					<div class="bwp-bundle-banner__price">
						<div class="bwp-bundle-banner__price-amount">
							<span class="bwp-bundle-banner__price-old">$9750</span>
							<span class="bwp-bundle-banner__price-new">$99</span>
						</div>
						<span class="bwp-bundle-banner__price-note"><?php esc_html_e( '* Lifetime Updates & All Future Themes Included', 'gym-training-coach' ); ?></span>
					</div>
					<div class="bwp-bundle-banner__visual" aria-hidden="true">
						<img class="logo" src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/bwt-bundle.png'); ?>"/>
					</div>
				</div>
			</div>
			<div class="tab">
				<button role="tab" class="tablinks home" onclick="gym_training_coach_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'gym-training-coach' ); ?></button>
				<button role="tab" class="tablinks" onclick="gym_training_coach_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'gym-training-coach' ); ?></button>
				<button role="tab" class="tablinks" onclick="gym_training_coach_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'gym-training-coach' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( GYM_TRAINING_COACH_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'gym-training-coach' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( GYM_TRAINING_COACH_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'gym-training-coach' ); ?>
				</a>
			</div>
			<div  id="bwp_getstart" class="tabcontent">
				<div class="row">
					<div class="col-md-5 intro">
						<div class="pad-box">
							<h2><?php esc_html_e( 'Welcome to Gym Training Coach ', 'gym-training-coach' ); ?>
							<span><?php esc_html_e( 'Version: ', 'gym-training-coach' ); ?><?php echo esc_html($gym_training_coach_theme['Version']);?></span>
							</h2>
							<span class="intro__version"><?php esc_html_e( 'Congratulations! You are about to use the most easy to use and flexible WordPress theme.', 'gym-training-coach' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'gym-training-coach' ); ?></strong></p>
								<p>
									<img class="logo" src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/theme-logo.png'); ?>"/>
								</p>
								<div class="demo-content">
									<?php
										/* Demo Import */
										require get_parent_theme_file_path( '/inc/dashboard/demo-content.php' );
									?>
								</div>

								<div id="demo-import-loader">
									<img src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/spinner.gif'); ?>" alt="<?php echo esc_attr( 'Loading...', 'gym-training-coach'); ?>" />
								</div>
							</div>
						</div>
					</div>
					<div class="col-md-7">
						<div class="install-plugins">
							<img src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/responsive1.png'); ?>" alt="<?php echo esc_attr( 'responsive-image', 'gym-training-coach'); ?>" />
							<div class="install-plugins__actions">
								<a class="install-plugins__btn install-plugins__btn--pro" href="<?php echo esc_url( GYM_TRAINING_COACH_BUY_PRO ); ?>" target="_blank"><?php esc_html_e( 'Get Pro at $39', 'gym-training-coach' ); ?></a>
								<a class="install-plugins__btn install-plugins__btn--bundle" href="<?php echo esc_url( GYM_TRAINING_COACH_BUY_BUNDLE ); ?>" target="_blank"><?php esc_html_e( 'Buy Bundle at $99', 'gym-training-coach' ); ?></a>
							</div>
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','gym-training-coach'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( GYM_TRAINING_COACH_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','gym-training-coach'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','gym-training-coach'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','gym-training-coach'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','gym-training-coach'); ?></a> <?php esc_html_e( 'your website.','gym-training-coach'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','gym-training-coach'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( GYM_TRAINING_COACH_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','gym-training-coach'); ?></a></li>
							</ol>
						</div>
					</div>
				</div>
			</div>
			<div  id="bwp_setup" class="tabcontent">
				<h2 class="tg-docs-section intruction-title" id="section-4"><?php esc_html_e( '1) Setup Gym Training Coach Theme', 'gym-training-coach' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Gym Training Coach is a high-performance solution designed specifically for personal trainer professionals, fitness coaches, health experts, athletic trainers, and gym instructors who want to build a standout online presence. Whether you’re a fitness expert, bodybuilding coach, nutritionist, CrossFit trainer, sports coach, or weight loss specialist, this platform offers comprehensive features to create an engaging website tailored for every personal trainer brand. Perfect for promoting gyms, fitness centers, training programs, online coaching, exercise tutorials, workout routines, and diet plans, it includes advanced functionality for showcasing services, pricing tables, testimonials, galleries, and fitness programs that help each trainer connect with potential clients. Built with a powerful page builder plugin for easy customization of layouts, colors, and sections without coding, Gym Training Coach is fully responsive, retina-ready, and cross-browser compatible, ensuring your site looks great on desktops, tablets, and smartphones. Its SEO-friendly design helps improve visibility, attract new clients, and expand your reach through social media integration and multilingual support, making it ideal for every personal trainer aiming to grow online. Whether sharing fitness tips, offering live workouts, or promoting health and wellness services, this theme provides a professional, flexible, and visually appealing foundation for every trainer looking to scale a successful fitness business.', 'gym-training-coach' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','gym-training-coach'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','gym-training-coach'); ?></a> <?php esc_html_e( 'your website.','gym-training-coach'); ?> </l>
								<li><?php esc_html_e( 'Gym Training Coach','gym-training-coach'); ?> <a target="_blank" href="<?php echo esc_url( GYM_TRAINING_COACH_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','gym-training-coach'); ?></a> </li>
							</ol>
						</div>
					</div>
					<div class="col-md-5">
						<div class="pad-box">
								<img class="logo" src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/screenshot.png'); ?>"/>
						</div>
					</div>	
				</div>
			</div>
			<div class="col-md-12 text-block tabcontent"  id="bwp_premium_info">
				<h2 class="dashboard-install-title"><?php esc_html_e( '2) Premium Theme Information.','gym-training-coach'); ?></h2>
				<div class="row">
					<div class="col-md-7">
						<img src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/responsive.png'); ?>" alt="<?php echo esc_attr( 'responsive-image', 'gym-training-coach'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','gym-training-coach'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'Our premium Training Coach WordPress Theme is great on the web. We have labored challenging in weeding out problems and fixing the theme, thereby giving you the most pleasant product possible. Not solely that, our theme has a massive slider with a banner with a Call to Action Button (CTA) to entice visitors. It is well-matched with WooCommerce and incorporates elements & lovely layouts for products, posts, and pages. It is made with tightly closed and easy codes with hooks, shortcodes, and different add-on customization choices that permit you to customize your internet site besides writing a single strand of code. This pinnacle theme has been made on the Bootstrap four framework, simplifying the improvement process. This Training Coach WordPress Theme assesses all the containers concerning facets and functionalities. You can take a tour of the top rate by simply clicking on the demo button, properly to sum it all up, we would like to name it the most suitable. This one theme is for every health coach who needs to create an excellent first-class internet site and have a brilliant theme for existing worldwide.', 'gym-training-coach' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','gym-training-coach'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Theme options using customizer API','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Responsive design','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Site Icon and Logo option.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Header Images option','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Favicon, Logo, title, and tagline customization','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets','gym-training-coach'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Pagination option.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Demo Importer.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Main Slider.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Woocommerce Compatible.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Unlimited Slides.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Section to show categories.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Product Listing based on category.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Top Categories Section.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Best Seller Tab.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Testimonial with custom post type.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Promotional Banners.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Partner Listing.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Shortcodes for Testimonials','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Newsletter with the help of contact form 7','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Well sanitized as per WordPress standards.','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Responsive layout for all devices','gym-training-coach'); ?></li>
									<li><?php esc_html_e( 'Typography for the complete website','gym-training-coach'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<?php }?>
