<?php
add_action( 'admin_menu', 'halloween_gift_store_gettingstarted' );
function halloween_gift_store_gettingstarted() {
	add_theme_page( esc_html__('About Theme', 'halloween-gift-store'), esc_html__('About Theme', 'halloween-gift-store'), 'edit_theme_options', 'halloween-gift-store-guide-page', 'halloween_gift_store_guide');
}

function halloween_gift_store_admin_theme_style() {
   wp_enqueue_style('halloween-gift-store-custom-admin-style', esc_url(get_template_directory_uri()) . '/inc/dashboard/get_started_info.css');
   wp_enqueue_script('halloween-gift-store-tab', esc_url( get_template_directory_uri() ) . '/inc/dashboard/js/get_started_tab.js');

       // Admin notice code START
		wp_register_script('halloween-gift-store-notice', esc_url( get_template_directory_uri()) . '/inc/dashboard//js/notice.js', array('jquery'), time(), true);
		wp_enqueue_script('halloween-gift-store-notice');
		// Admin notice code END
}
add_action('admin_enqueue_scripts', 'halloween_gift_store_admin_theme_style');         

function halloween_gift_store_notice(){
    global $pagenow;
    if ( is_admin() && $pagenow === 'themes.php' && (!isset($_GET['page']) || $_GET['page'] !== 'halloween-gift-store-guide-page')
) {
$halloween_gift_store_meta = get_option( 'halloween_gift_store_admin_notice' );
	if (!$halloween_gift_store_meta) {?>
    <div id="halloween-gift-store-welcome-notice" class="notice notice-success is-dismissible getting_started activation-notice">
		<div class="notice-info">
			<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 Halloween Gift Store, You Rock!', 'halloween-gift-store' ) ?> </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 charity website. Please Click on the link below to know the theme setup information.', 'halloween-gift-store' ) ?></p>
				<div style="display: grid;">
					<a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=halloween-gift-store-guide-page' )); ?>"><?php esc_html_e( 'Getting Started', 'halloween-gift-store' ) ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_LIVE_DEMO ); ?>"><?php esc_html_e('Pro Demo', 'halloween-gift-store') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_FREE_DOC ); ?>"><?php esc_html_e('Free Doc', 'halloween-gift-store') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_BUY_PRO ); ?>"><?php esc_html_e('Upgrade To Pro', 'halloween-gift-store') ?></a>
				</div>
			</div>
		</div>
	</div>
	<?php }
}
}
add_action('admin_notices', 'halloween_gift_store_notice');

// Admin notice code START
function halloween_gift_store_dismissed_notice() {
	update_option( 'halloween_gift_store_admin_notice', true );
}
add_action( 'wp_ajax_halloween_gift_store_dismissed_notice', 'halloween_gift_store_dismissed_notice' );

//After Switch theme function
add_action('after_switch_theme', 'halloween_gift_store_getstart_setup_options');
function halloween_gift_store_getstart_setup_options () {
    update_option('halloween_gift_store_admin_notice', false );
}
/**
 * Theme Info Page
 */
function halloween_gift_store_guide() {
	// Theme info
	$halloween_gift_store_return = add_query_arg( array()) ;
	$halloween_gift_store_theme = wp_get_theme( 'halloween-gift-store' ); ?>

	<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="tab">
				<button role="tab" class="tablinks home" onclick="halloween_gift_store_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'About Theme', 'halloween-gift-store' ); ?></button>
				<button role="tab" class="tablinks" onclick="halloween_gift_store_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'halloween-gift-store' ); ?></button>
				<button role="tab" class="tablinks" onclick="halloween_gift_store_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'halloween-gift-store' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'halloween-gift-store' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'halloween-gift-store' ); ?>
				</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 Halloween Gift Store ', 'halloween-gift-store' ); ?>
							<span><?php esc_html_e( 'Version: ', 'halloween-gift-store' ); ?><?php echo esc_html($halloween_gift_store_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.', 'halloween-gift-store' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'halloween-gift-store' ); ?></strong></p>
								<p>
									<img class="logo" src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/theme-logo.png'); ?>"/>
								</p>
								<p class="notice-text"><strong><?php echo esc_html__( 'Click the button below to visit your site.', 'halloween-gift-store' ); ?></strong></p>
                                <?php echo '<span><a href="' . esc_url(home_url()) . '" class="site-btn" target="_blank">' . esc_html__('VIEW SITE', 'halloween-gift-store') . '</a></span>'; ?>
							</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', 'halloween-gift-store'); ?>" />
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','halloween-gift-store'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','halloween-gift-store'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_PRO_SUPPORT ); ?>"><?php esc_html_e( 'Premium Theme Support','halloween-gift-store'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','halloween-gift-store'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','halloween-gift-store'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','halloween-gift-store'); ?></a> <?php esc_html_e( 'your website.','halloween-gift-store'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','halloween-gift-store'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','halloween-gift-store'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_PRO_DOC ); ?>"><?php esc_html_e( 'Premium Theme Documentation','halloween-gift-store'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Buy Premium','halloween-gift-store'); ?></h3>
							<ol>
								<a href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Pro', 'halloween-gift-store'); ?></a>
							</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 Halloween Gift Store Theme', 'halloween-gift-store' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Step into the spooky spirit of the season with the Halloween Gift Store Theme, an ideal choice for running a Halloween shop, gift boutique, holiday eCommerce site, spooky store, or seasonal gift marketplace. Designed with beautiful, vibrant Halloween colors, eerie typography, and festive visuals, this theme gives your store a fun yet professional look while naturally targeting search terms such as spooky decorations, horror accessories, haunted house décor, party props, trick-or-treat baskets, pumpkin gifts, ghost décor, creepy collectibles, and novelty toys. Whether you sell Halloween costumes, pumpkins, home décor, craft items, scary collectibles, or spooky party supplies, this theme helps your online Halloween marketplace stand out. With built-in WooCommerce support and compatibility with popular tools like Contact Form 7, Mailchimp, Yoast SEO, and Smush, you can smoothly manage products, customer inquiries, email campaigns, and site optimization. Its fully responsive design ensures your Halloween gift shop looks impressive on desktops, tablets, and mobile devices. Easy drag-and-drop customization lets you personalize layouts, banners, and collections without hassle. Optimized for SEO and fast loading, the theme helps attract festive shoppers searching for haunted décor, Halloween props, costume add-ons, and seasonal offers. Pre-designed layouts for product pages, gift collections, and promotional sections make it perfect for highlighting limited-time Halloween deals. Whether you’re a small Halloween boutique owner or a creative seller preparing for the spooky season, the Halloween Gift Store Theme offers a memorable, search-friendly, and customer-focused shopping experience with a truly beautiful and vibrant appeal.', 'halloween-gift-store' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','halloween-gift-store'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','halloween-gift-store'); ?></a> <?php esc_html_e( 'your website.','halloween-gift-store'); ?> </l>
								<li><?php esc_html_e( 'Halloween Gift Store','halloween-gift-store'); ?> <a target="_blank" href="<?php echo esc_url( HALLOWEEN_GIFT_STORE_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','halloween-gift-store'); ?></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.','halloween-gift-store'); ?></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', 'halloween-gift-store'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','halloween-gift-store'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'Celebrate the spooky season with the Halloween WordPress Theme, an immersive, high-quality design that brings eerie charm and professional sophistication to your website. Perfect for Halloween stores, haunted houses, festive blogs, or event organizers, this theme captures the essence of the season through its dark visuals, vibrant orange accents, and mysterious typography. Every element has been designed to create an enchanting atmosphere that instantly grabs attention. The themes fully responsive layout ensures your site looks flawless across all screen sizes, from desktops to mobile devices, delivering a seamless experience to every visitor. With its intuitive customization panel, you can easily change fonts, colors, and layouts without any coding skills. Its compatible with top WordPress plugins such as Elementor, Contact Form 7, and Yoast SEO, ensuring you have complete creative flexibility. The Halloween WordPress Theme also features lightning-fast load times, retina-ready graphics, and SEO optimization, helping your site perform beautifully and rank effectively. Whether youre showcasing Halloween decorations, promoting themed parties, or running an online costume store, this theme provides the perfect foundation for your seasonal website. Its stunning visual effects, flexible design tools, and reliable performance make it an ideal choice for anyone looking to create a spine-chilling yet elegant web presence that stands out all season long.', 'halloween-gift-store' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','halloween-gift-store'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Responsive & Mobile-Friendly Design','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Retina-Ready Display','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Bootstrap Framework','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Fast Load Times','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Extensive Customization Options','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Interactive CTA Buttons','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Dynamic Banner Section','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Testimonial Section','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Team Showcase Section','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Pre-Built Shortcodes','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Clean and Secure Code','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'SEO-Optimized Structure','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Minimal and Elegant Layout','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'One-Click Demo Import','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'WooCommerce Compatibility','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Customizable Typography','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Color Scheme Control','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Cross-Browser Compatibility','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Regular Theme Updates','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Built for Print-on-Demand Businesses','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Lightweight Theme Architecture','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Easy Product Showcase','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Blog Section Included','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Contact Form Integration','halloween-gift-store'); ?></li>
									<li><?php esc_html_e( 'Compatible with Page Builders','halloween-gift-store'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php }?>
