<?php
add_action( 'admin_menu', 'home_tutor_gettingstarted' );
function home_tutor_gettingstarted() {
	add_theme_page( esc_html__('Theme Demo Import', 'home-tutor'), esc_html__('Theme Demo Import', 'home-tutor'), 'edit_theme_options', 'home-tutor-guide-page', 'home_tutor_guide');
}

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

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

// Notice after Theme Activation
function home_tutor_activation_notice() {

    $meta = get_option( 'home_tutor_admin_notice' );

    if ( ! $meta ) { ?>
        
        <div id="home-tutor-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 Home Tutor, You Rock!', 'home-tutor' ); ?></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 tutoring website. Please click the link below for theme setup details.', 'home-tutor' ); ?></p>
                    <div style="display: grid;">
                        <a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=home-tutor-guide-page' ) ); ?>">
                            <?php esc_html_e( 'Getting Started', 'home-tutor' ); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( Home_Tutor_LIVE_DEMO ); ?>">
                            <?php esc_html_e('Pro Demo', 'home-tutor'); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( Home_Tutor_FREE_DOC ); ?>">
                            <?php esc_html_e('Free Doc', 'home-tutor'); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( Home_Tutor_BUY_PRO ); ?>">
                            <?php esc_html_e('Upgrade To Pro', 'home-tutor'); ?>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    <?php }
}
add_action( 'admin_notices', 'home_tutor_activation_notice' );

// Admin notice code START
function home_tutor_dismissed_notice() {
	update_option( 'home_tutor_admin_notice', true );
}
add_action( 'wp_ajax_home_tutor_dismissed_notice', 'home_tutor_dismissed_notice' );

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

/**VW Coaching Institute
 * Theme Info Page
 */
function home_tutor_guide() {
	// Theme info
	$home_tutor_return = add_query_arg( array()) ;
	$home_tutor_theme = wp_get_theme( 'home-tutor' ); ?>

	<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="home_tutor_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Getting Started', 'home-tutor' ); ?></button>
				<button role="tab" class="tablinks" onclick="home_tutor_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'home-tutor' ); ?></button>
				<button role="tab" class="tablinks" onclick="home_tutor_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'home-tutor' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( Home_Tutor_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'home-tutor' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( Home_Tutor_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'home-tutor' ); ?>
				</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 Home Tutor ', 'home-tutor' ); ?>
							<span><?php esc_html_e( 'Version: ', 'home-tutor' ); ?><?php echo esc_html($home_tutor_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.', 'home-tutor' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'home-tutor' ); ?></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...', 'home-tutor'); ?>" />
								</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( 'home-tutor-preview', 'home-tutor'); ?>" />
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','home-tutor'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( Home_Tutor_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','home-tutor'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( Home_Tutor_PRO_SUPPORT ); ?>"><?php esc_html_e( 'Premium Theme Support','home-tutor'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','home-tutor'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','home-tutor'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','home-tutor'); ?></a> <?php esc_html_e( 'your website.','home-tutor'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','home-tutor'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( Home_Tutor_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','home-tutor'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( Home_Tutor_PRO_DOC ); ?>"><?php esc_html_e( 'Premium Theme Documentation','home-tutor'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Buy Premium','home-tutor'); ?></h3>
							<ol>
								<a href="<?php echo esc_url( Home_Tutor_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Pro', 'home-tutor'); ?></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 Home Tutor Theme', 'home-tutor' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Home Tutor is a flexible coacher theme designed for private tutors, online instructors, coaching centers, and educational consultants looking to build a modern e-learning platform. It provides structured layouts for presenting tutor profiles, course details, subject categories, schedules, and contact information, making it ideal for any coacher setup. The theme includes pre-designed sections for services, testimonials, and academic programs, allowing educational offerings to be displayed in a clear and organized format for effective e-learning delivery. It supports showcasing one-on-one sessions and online classes with dedicated content areas, making it a reliable coacher theme for digital education. The responsive layout ensures compatibility across desktops, tablets, and mobile devices, enhancing the overall e-learning experience. Built-in customization options make it easy to adjust colors, typography, and layout settings without editing code, giving every coacher full control over their website design. The theme also supports commonly used plugins for contact forms, booking systems, and learning management features, offering a practical foundation for an e-learning website and making this coacher theme a strong choice for modern education platforms.', 'home-tutor' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','home-tutor'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','home-tutor'); ?></a> <?php esc_html_e( 'your website.','home-tutor'); ?> </l>
								<li><?php esc_html_e( 'Home Tutor','home-tutor'); ?> <a target="_blank" href="<?php echo esc_url( Home_Tutor_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','home-tutor'); ?></a> </li>
							</ol>
						</div>
					</div>
					<div class="col-md-5">
						<div class="pad-box">
								<img class="logo" src="<?php echo esc_url( get_stylesheet_directory_uri() . '/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.','home-tutor'); ?></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( 'home-tutor-preview', 'home-tutor'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','home-tutor'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'Elevate your online tutoring services with the Tutor WordPress Theme, a professionally designed solution tailored for educators, private tutors, coaching centers, and e-learning platforms. This theme combines a clean, modern layout with intuitive functionality, ensuring that your students, parents, and visitors can navigate your website effortlessly. With a fully responsive and mobile-friendly design, your website will look flawless on desktops, tablets, and smartphones, delivering an optimal user experience for all audiences. The Tutor WordPress Theme includes ready-to-use sections for courses, teacher profiles, testimonials, pricing plans, and contact forms, allowing you to present your services professionally while building credibility. Advanced customization options make it easy to adjust colors, fonts, layouts, and header styles without touching a single line of code, making it ideal for both beginners and experienced WordPress users. Optimized for speed and performance, the theme ensures fast loading times and smooth navigation, keeping your audience engaged. In addition, the Tutor WordPress Theme is SEO-friendly, helping your website rank higher in search engine results and attract more potential students. Integration with popular plugins, including Elementor and WPForms, gives you complete control over your site’s functionality, enabling you to add advanced features such as booking forms, event calendars, and online course modules effortlessly.Take your tutoring business to the next level with the Tutor WordPress Theme, designed to provide a complete online learning platform. The theme includes built-in sections for blogs, educational resources, newsletters, and social media integration, allowing you to promote your content effectively while keeping your students informed. Whether you’re offering academic tutoring, language courses, music lessons, or skill development programs, this theme ensures a seamless experience that boosts student engagement and satisfaction. Compatible with popular e-learning and e-commerce plugins like LearnPress and WooCommerce, it allows you to sell courses, manage enrollments, and expand your offerings as your business grows. With a focus on user experience, the Tutor WordPress Theme ensures easy course management, clear navigation, and interactive design elements that build trust with potential clients. Its professional yet approachable design helps create a strong online presence for your educational services, making it easier for students to find, explore, and enroll in your courses. Whether you are a solo tutor or managing a tutoring center, this theme provides a flexible, scalable, and visually appealing platform that sets you apart from competitors while ensuring your website meets modern web standards.', 'home-tutor' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','home-tutor'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Theme options using Customizer API','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Responsive design','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Site Icon and Logo option','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Header Images option','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Favicon, Logo, title, and tagline customization','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets','home-tutor'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Pagination option','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Demo Importer','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Main Slider','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Woocommerce Compatible','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Unlimited Slides','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Section to show categories','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Product Listing based on category','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Top Categories Section','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Best Seller Tab','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Testimonial with custom post type','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Promotional Banners','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Shortcodes for Testimonials','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Newsletter with the help of contact form 7.','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Well-sanitized as per WordPress standards.','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Responsive layout for all devices','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Typography for the complete website','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Global Color pallete','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Section specific Color pallete','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Fully integrated with Font Awesome Icon','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Instagram Section','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Background Image Option','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Custom page templates','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Allow setting site title, tagline, logo','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Contact Page Template','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Blog Full width and right and left sidebar','home-tutor'); ?></li>
									<li><?php esc_html_e( 'Recent post widget with images, Related post','home-tutor'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php }?>
