<?php
add_action( 'admin_menu', 'jungle_safari_gettingstarted' );
function jungle_safari_gettingstarted() {
	add_theme_page( esc_html__('About Theme', 'jungle-safari'), esc_html__('Theme Demo Import', 'jungle-safari'), 'edit_theme_options', 'jungle-safari-guide-page', 'jungle_safari_guide');
}

function jungle_safari_admin_theme_style() {
   wp_enqueue_style('jungle-safari-custom-admin-style', esc_url(get_template_directory_uri()) . '/inc/dashboard/get_started_info.css');
   wp_enqueue_script('jungle-safari-tab', esc_url( get_template_directory_uri() ) . '/inc/dashboard/js/get_started_tab.js');

   // Admin notice code START
	wp_register_script('jungle-safari-notice', esc_url(get_template_directory_uri()) . '/inc/dashboard/js/notice.js', array('jquery'), time(), true);
	wp_enqueue_script('jungle-safari-notice');
	// Admin notice code END
}
add_action('admin_enqueue_scripts', 'jungle_safari_admin_theme_style');

// Notice after Theme Activation
function jungle_safari_notice(){
    global $pagenow;
    if ( is_admin() && $pagenow === 'themes.php' && (!isset($_GET['page']) || $_GET['page'] !== 'jungle-safari-guide-page')
) {
$jungle_safari_meta = get_option( 'jungle_safari_admin_notice' );
	if (!$jungle_safari_meta) {?>
    <div id="jungle-safari-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 Jungle Safari, You Rock!', 'jungle-safari' ) ?> </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.', 'jungle-safari' ) ?></p>
				<div style="display: grid;">
					<a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=jungle-safari-guide-page' )); ?>"><?php esc_html_e( 'Getting Started', 'jungle-safari' ) ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( JUNGLE_SAFARI_LIVE_DEMO ); ?>"><?php esc_html_e('Pro Demo', 'jungle-safari') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( JUNGLE_SAFARI_FREE_DOC ); ?>"><?php esc_html_e('Free Doc', 'jungle-safari') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( JUNGLE_SAFARI_BUY_PRO ); ?>"><?php esc_html_e('Upgrade To Pro', 'jungle-safari') ?></a>
				</div>
			</div>
		</div>
	</div>
	<?php }
}
}
add_action('admin_notices', 'jungle_safari_notice');

// Admin notice code START
function jungle_safari_dismissed_notice() {
	update_option( 'jungle_safari_admin_notice', true );
}
add_action( 'wp_ajax_jungle_safari_dismissed_notice', 'jungle_safari_dismissed_notice' );

//After Switch theme function
add_action('after_switch_theme', 'jungle_safari_getstart_setup_options');
function jungle_safari_getstart_setup_options () {
    update_option('jungle_safari_admin_notice', false );
}
// Admin notice code END
/**
 * Theme Info Page
 */
function jungle_safari_guide() {
	// Theme info
	$jungle_safari_return = add_query_arg( array()) ;
	$jungle_safari_theme = wp_get_theme( 'jungle-safari' ); ?>

	<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="jungle_safari_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'jungle-safari' ); ?></button>
				<button role="tab" class="tablinks" onclick="jungle_safari_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'jungle-safari' ); ?></button>
				<button role="tab" class="tablinks" onclick="jungle_safari_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'jungle-safari' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( JUNGLE_SAFARI_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'jungle-safari' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( JUNGLE_SAFARI_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'jungle-safari' ); ?>
				</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 Jungle Safari ', 'jungle-safari' ); ?>
							<span><?php esc_html_e( 'Version: ', 'jungle-safari' ); ?><?php echo esc_html($jungle_safari_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.', 'jungle-safari' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'jungle-safari' ); ?></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...', 'jungle-safari'); ?>" />
								</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', 'jungle-safari'); ?>" />
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','jungle-safari'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( JUNGLE_SAFARI_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','jungle-safari'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( JUNGLE_SAFARI_PRO_SUPPORT ); ?>"><?php esc_html_e( 'Premium Theme Support','jungle-safari'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','jungle-safari'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','jungle-safari'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','jungle-safari'); ?></a> <?php esc_html_e( 'your website.','jungle-safari'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','jungle-safari'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( JUNGLE_SAFARI_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','jungle-safari'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( JUNGLE_SAFARI_PRO_DOC ); ?>"><?php esc_html_e( 'Premium Theme Documentation','jungle-safari'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Buy Premium','jungle-safari'); ?></h3>
							<ol>
								<a href="<?php echo esc_url( JUNGLE_SAFARI_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Pro', 'jungle-safari'); ?></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 Jungle Safari Theme', 'jungle-safari' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Jungle Safari is an adventurous, visually striking theme crafted for jungle tour operators, safari booking services, wildlife resorts, forest lodges, eco-tourism businesses, adventure travel companies, nature tourism, outdoor adventure agencies, travel booking platforms, trekking tour services, camping organizers, wildlife photography guides, bird-watching groups, forest expedition teams, and eco-adventure holiday planners. Designed to capture the thrill of nature exploration, wilderness travel, and wildlife encounters, it is ideal for showcasing safari experiences, guided tours, jungle trips, trekking packages, camping tours, wildlife safaris, nature trails, forest adventures, and adventure package listings. The layout features a stunning 3D-style banner section that immerses visitors in a lifelike wilderness atmosphere, enhancing jungle tour promotion and wildlife storytelling. The featured tours grid highlights top safari tours, adventure packages, and travel experiences, helping visitors explore offerings at a glance. Fully responsive and mobile-friendly, Jungle Safari ensures your adventure site delivers smooth performance across all devices. It supports Contact Form 7 for managing tour inquiries, safari bookings, travel requests, and custom adventure forms, while integrating seamlessly with Smart Slider 3 for dynamic wildlife sliders and immersive visual presentations. With SEO-optimized structure, social media integration, fast loading layout, and customizable sections for About, Services, Tour Packages, and Contact pages, it enhances online visibility and visitor engagement. Whether youre promoting jeep safaris, wildlife photography tours, eco-friendly retreats, nature exploration trips, adventure journeys, or forest expeditions, Jungle Safari provides immersive visuals, smooth navigation, and professional functionality to elevate your travel and tourism business into a thriving online destination.', 'jungle-safari' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','jungle-safari'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','jungle-safari'); ?></a> <?php esc_html_e( 'your website.','jungle-safari'); ?> </l>
								<li><?php esc_html_e( 'Jungle Safari','jungle-safari'); ?> <a target="_blank" href="<?php echo esc_url( JUNGLE_SAFARI_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','jungle-safari'); ?></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.','jungle-safari'); ?></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', 'jungle-safari'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','jungle-safari'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'Jungle Safari is an adventurous, visually striking WordPress theme crafted specifically for jungle tour operators, safari booking services, wildlife resorts, forest lodges, and eco-tourism businesses. Designed to capture the thrill of nature exploration and wildlife encounters, this theme is perfect for showcasing jungle experiences, guided tours, and eco-adventure packages. The layout features a stunning 3D-style banner section that instantly immerses visitors in a lifelike wilderness atmosphere, setting the tone for an unforgettable journey. The featured tours grid section allows you to highlight top safari tours, wildlife expeditions, or trekking packages in an organized and engaging format, making it easy for potential visitors to explore offerings at a glance. Fully responsive and mobile-friendly, Jungle Safari ensures your site looks great on any device. It supports Contact Form 7, allowing you to easily manage inquiries, bookings, or custom tour requests with user-friendly contact forms. With SEO optimization built-in, this theme helps increase your visibility in search engines, driving more organic traffic and adventure seekers to your website. Its intuitive layout is ideal for customizing key pages like About, Services, Tour Packages, and Contact, while also integrating social media links to boost your online presence. Whether you\'re promoting jeep safaris, nature trails, wildlife photography tours, or eco-friendly retreats, Jungle Safari gives you the tools to present your offerings in a bold, immersive way. From compelling visuals to seamless user experience, this theme is the perfect companion for turning your jungle adventures into a thriving online business.', 'jungle-safari' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','jungle-safari'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Theme options using Customizer API','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Responsive design','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Site Icon and Logo option','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Header Images option','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Favicon, Logo, title, and tagline customization','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets','jungle-safari'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Pagination option','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Demo Importer','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Main Slider','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Woocommerce Compatible','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Unlimited Slides','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Section to show categories','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Product Listing based on category','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Top Categories Section','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Best Seller Tab','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Testimonial with custom post type','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Promotional Banners','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Shortcodes for Testimonials','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Newsletter with the help of contact form 7.','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Well-sanitized as per WordPress standards.','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Responsive layout for all devices','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Typography for the complete website','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Global Color pallete','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Section specific Color pallete','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Fully integrated with Font Awesome Icon','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Instagram Section','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Background Image Option','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Custom page templates','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Allow setting site title, tagline, logo','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Contact Page Template','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Blog Full width and right and left sidebar','jungle-safari'); ?></li>
									<li><?php esc_html_e( 'Recent post widget with images, Related post','jungle-safari'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php }?>
