<?php

add_action( 'admin_menu', 'pet_rescue_lite_gettingstarted' );
function pet_rescue_lite_gettingstarted() {    	
	add_theme_page( esc_html__('About Theme', 'pet-rescue-lite'), esc_html__('Theme Demo Import', 'pet-rescue-lite'), 'edit_theme_options', 'pet-rescue-lite-guide-page', 'pet_rescue_lite_guide');   
}

function pet_rescue_lite_admin_theme_style() {
   wp_enqueue_style('pet-rescue-lite-custom-admin-style', esc_url(get_template_directory_uri()) . '/inc/dashboard/get_started_info.css');
   wp_enqueue_script('pet-rescue-lite-tab', esc_url( get_template_directory_uri() ) . '/inc/dashboard/js/get_started_tab.js');

   // Admin notice code START
	wp_register_script('pet-rescue-lite-notice', esc_url(get_template_directory_uri()) . '/inc/dashboard/js/notice.js', array('jquery'), time(), true);
	wp_enqueue_script('pet-rescue-lite-notice');
	// Admin notice code END
}
add_action('admin_enqueue_scripts', 'pet_rescue_lite_admin_theme_style');

// Notice after Theme Activation
function pet_rescue_lite_notice(){
    global $pagenow;
    if ( is_admin() && $pagenow === 'themes.php' && (!isset($_GET['page']) || $_GET['page'] !== 'pet-rescue-lite-guide-page')
) {
$pet_rescue_lite_meta = get_option( 'pet_rescue_lite_admin_notice' );
	if (!$pet_rescue_lite_meta) {?>
    <div id="pet-rescue-lite-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 Pet Rescue Lite, You Rock!', 'pet-rescue-lite' ) ?> </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.', 'pet-rescue-lite' ) ?></p>
				<div style="display: grid;">
					<a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=pet-rescue-lite-guide-page' )); ?>"><?php esc_html_e( 'Get Started', 'pet-rescue-lite' ) ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( PET_RESCUE_LITE_LIVE_DEMO ); ?>"><?php esc_html_e('Pro Demo', 'pet-rescue-lite') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( PET_RESCUE_LITE_BUY_PRO ); ?>"><?php esc_html_e('Upgrade To Pro', 'pet-rescue-lite') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( PET_RESCUE_LITE_FREE_DOC ); ?>"><?php esc_html_e('Free Doc', 'pet-rescue-lite') ?></a>
				</div>
			</div>
		</div>
	</div>
	<?php }
}
}
add_action('admin_notices', 'pet_rescue_lite_notice');

// Admin notice code START
function pet_rescue_lite_dismissed_notice() {
	update_option( 'pet_rescue_lite_admin_notice', true );
}
add_action( 'wp_ajax_pet_rescue_lite_dismissed_notice', 'pet_rescue_lite_dismissed_notice' );

//After Switch theme function
add_action('after_switch_theme', 'pet_rescue_lite_getstart_setup_options');
function pet_rescue_lite_getstart_setup_options () {
    update_option('pet_rescue_lite_admin_notice', false );
}
// Admin notice code END

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

	// Theme info
	$pet_rescue_lite_return = add_query_arg( array()) ;
	$pet_rescue_lite_theme = wp_get_theme( 'pet-rescue-lite' ); ?>

	<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="pet_rescue_lite_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'pet-rescue-lite' ); ?></button>
				<button role="tab" class="tablinks" onclick="pet_rescue_lite_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'pet-rescue-lite' ); ?></button>
				<button role="tab" class="tablinks" onclick="pet_rescue_lite_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'pet-rescue-lite' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( PET_RESCUE_LITE_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'pet-rescue-lite' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( PET_RESCUE_LITE_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'pet-rescue-lite' ); ?>
				</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 Pet Rescue Lite ', 'pet-rescue-lite' ); ?>
							<span><?php esc_html_e( 'Version: ', 'pet-rescue-lite' ); ?><?php echo esc_html($pet_rescue_lite_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.', 'pet-rescue-lite' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'pet-rescue-lite' ); ?></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...', 'pet-rescue-lite'); ?>" />
								</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', 'pet-rescue-lite'); ?>" />
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','pet-rescue-lite'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( PET_RESCUE_LITE_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','pet-rescue-lite'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( PET_RESCUE_LITE_PRO_SUPPORT ); ?>"><?php esc_html_e( 'Premium Theme Support','pet-rescue-lite'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','pet-rescue-lite'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','pet-rescue-lite'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','pet-rescue-lite'); ?></a> <?php esc_html_e( 'your website.','pet-rescue-lite'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','pet-rescue-lite'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( PET_RESCUE_LITE_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','pet-rescue-lite'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( PET_RESCUE_LITE_PRO_DOC ); ?>"><?php esc_html_e( 'Premium Theme Documentation','pet-rescue-lite'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Buy Premium','pet-rescue-lite'); ?></h3>
							<ol>
								<a href="<?php echo esc_url( PET_RESCUE_LITE_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Pro', 'pet-rescue-lite'); ?></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 Pet Rescue Lite Theme', 'pet-rescue-lite' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Pet Rescue Lite is a highly functional theme designed for pet grooming, animal shelter websites, pet care, pet adoption, and veterinary clinics. Whether you\'re running a pet shop, wildlife care organization, animal welfare center, animal sanctuary, or a pet hospital, this theme is ideal for showcasing your services. Its clean, professional layout and responsive design ensure your website looks great on all screen sizes. Pet Rescue Lite is user-friendly, with a variety of customization options available, so you don\'t need coding knowledge to get started. The theme\'s SEO-optimized codes enhance your website\'s visibility, helping you reach a larger audience while ensuring faster page load times. With built-in Call to Action (CTA) buttons, Pet Rescue Lite effectively boosts conversions and provides a seamless user experience. Additionally, the integration of social media options allows you to easily promote your pet-related services and share important updates. The themes clean, secure coding ensures smooth performance across devices, and the inclusion of stunning animations and interactive elements adds a layer of engagement to your site. Built with the powerful Bootstrap framework, Pet Rescue Lite provides a flexible and robust design, making it a perfect choice for any pet-related business. Whether you\'re an animal welfare organization or a veterinary clinic, this theme ensures your online presence is both professional and functional.', 'pet-rescue-lite' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','pet-rescue-lite'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','pet-rescue-lite'); ?></a> <?php esc_html_e( 'your website.','pet-rescue-lite'); ?> </l>
								<li><?php esc_html_e( 'Pet Rescue Lite','pet-rescue-lite'); ?> <a target="_blank" href="<?php echo esc_url( PET_RESCUE_LITE_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','pet-rescue-lite'); ?></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.','pet-rescue-lite'); ?></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', 'pet-rescue-lite'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','pet-rescue-lite'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'For pet owners who want to get their pet services online and want to create a professional website for it, this Pet Rescue WordPress Theme is going to be your ideal match. It gives you the easiest way of creating websites without implementing anything from scratch. As the internet is the easiest way to obtain information, creating a professional website for your pet services will give you the desired popularity by spreading the word about the various pet-related services you are offering. Veterinary doctors, animal care centers, animal and pet rescuers, etc. will love the design this theme brings. It has a professional design that reflects the key info right on top of the homepage followed by an impressive full-width slider giving a seamless display of attractive images. Slider settings are also made available to get you full control so that you can decide how many images you want to put up for the slide show. Its retina-ready design gives a pixel-perfect display of pictures and content made available on your website no matter what the viewing devices screen resolution is. With Pet resume WordPress Theme, you also find a lot of creative freedom as it comprises plenty of customization options.', 'pet-rescue-lite' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','pet-rescue-lite'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Car listing Shortcode with category','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Car listing Shortcode','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Multiple image feature for each property with slider.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Brand Listing Section','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Car Brand(categories) Option','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Car Tags(categories) Option','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Testimonial listing.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Testimonial shortcode.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Social icons widget.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Latest post with the image widget.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Live customize editor for the About US section.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Font Awesome integrated.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Well sanitized as per WordPress standards.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Allow to set site title, tagline, logo.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page.','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Footer Widgets & Editor style','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Gallery & Banner functionality','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Full-width Template','pet-rescue-lite'); ?></li>
									<li><?php esc_html_e( 'Custom Menu, Colors Editor','pet-rescue-lite'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<?php }?>