<?php

add_action( 'admin_menu', 'handyman_cleaner_gettingstarted' );
function handyman_cleaner_gettingstarted() {
	add_theme_page( esc_html__('About Theme', 'handyman-cleaner'), esc_html__('Theme Demo Import', 'handyman-cleaner'), 'edit_theme_options', 'handyman-cleaner-guide-page', 'handyman_cleaner_guide');
}

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

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


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

function handyman_cleaner_activation_notice() {
    // Hide permanently if dismissed
    if ( get_option('handyman_cleaner_admin_notice') == 1 ) {
        return;
    }
    // Hide ONLY on Get Started page
    if ( isset($_GET['page']) && $_GET['page'] === 'handyman-cleaner-guide-page' ) {
        return;
    }  { ?>        
        <div id="handyman-cleaner-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 Handyman Cleaner, You Rock!', 'handyman-cleaner' ); ?></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.', 'handyman-cleaner' ); ?></p>
                    <div style="display: grid;">
                        <a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=handyman-cleaner-guide-page' ) ); ?>">
                            <?php esc_html_e( 'Getting Started', 'handyman-cleaner' ); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( HANDYMAN_CLEANER_BUY_BUNDLE ); ?>"><?php esc_html_e('Get Bundle', 'handyman-cleaner') ?></a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url(HANDYMAN_CLEANER_LIVE_DEMO ); ?>">
                            <?php esc_html_e('Pro Demo', 'handyman-cleaner'); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url(HANDYMAN_CLEANER_FREE_DOC ); ?>">
                            <?php esc_html_e('Free Doc', 'handyman-cleaner'); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url(HANDYMAN_CLEANER_BUY_PRO ); ?>">
                            <?php esc_html_e('Upgrade To Pro', 'handyman-cleaner'); ?>
                        </a>
                    </div>
                </div>
            </div>
        </div>

    <?php }
}
//Hook (VERY IMPORTANT)
add_action('admin_notices', 'handyman_cleaner_activation_notice');

// Admin notice code START
add_action('wp_ajax_handyman_cleaner_dismiss_notice', 'handyman_cleaner_dismiss_notice');
function handyman_cleaner_dismiss_notice() {
    update_option('handyman_cleaner_admin_notice', 1);
    wp_die();
}

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


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

	// Theme info
	$handyman_cleaner_return = add_query_arg( array()) ;
	$handyman_cleaner_theme = wp_get_theme( 'handyman-cleaner' ); ?>

	<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', 'handyman-cleaner' ); ?></span>
						<h2 class="bwp-bundle-banner__title"><?php esc_html_e( '250+ Premium WordPress Themes in One Bundle', 'handyman-cleaner' ); ?></h2>
						<p class="bwp-bundle-banner__desc">
							<strong><?php esc_html_e( 'SUMMER SALE!', 'handyman-cleaner' ); ?></strong>
							<?php esc_html_e( 'Get 15% off on a Bundle of 250+ Premium WP Themes. Use', 'handyman-cleaner' ); ?>
							<span class="bwp-bundle-banner__coupon-inline">&quot;SUMMER15&quot;</span>
							<?php esc_html_e( 'at Checkout.', 'handyman-cleaner' ); ?>
						</p>
						<div class="bwp-bundle-banner__actions">
							<a class="bwp-bundle-banner__cta" target="_blank" href="<?php echo esc_url( HANDYMAN_CLEANER_BUY_BUNDLE ); ?>"><?php esc_html_e( 'Get Bundle Just at $99', 'handyman-cleaner' ); ?><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', 'handyman-cleaner' ); ?>">
								<span class="bwp-bundle-banner__coupon-label"><?php esc_html_e( 'Coupon Code', 'handyman-cleaner' ); ?></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!', 'handyman-cleaner' ); ?></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', 'handyman-cleaner' ); ?></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="handyman_cleaner_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'handyman-cleaner' ); ?></button>
				<button role="tab" class="tablinks" onclick="handyman_cleaner_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'handyman-cleaner' ); ?></button>
				<button role="tab" class="tablinks" onclick="handyman_cleaner_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'handyman-cleaner' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( HANDYMAN_CLEANER_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'handyman-cleaner' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( HANDYMAN_CLEANER_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'handyman-cleaner' ); ?>
				</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 Handyman Cleaner ', 'handyman-cleaner' ); ?>
							<span><?php esc_html_e( 'Version: ', 'handyman-cleaner' ); ?><?php echo esc_html($handyman_cleaner_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.', 'handyman-cleaner' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'handyman-cleaner' ); ?></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...', 'handyman-cleaner'); ?>" />
								</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', 'handyman-cleaner'); ?>" />
							<div class="install-plugins__actions">
								<a class="install-plugins__btn install-plugins__btn--pro" href="<?php echo esc_url( HANDYMAN_CLEANER_BUY_PRO ); ?>" target="_blank"><?php esc_html_e( 'Get Pro at $39', 'handyman-cleaner' ); ?></a>
								<a class="install-plugins__btn install-plugins__btn--bundle" href="<?php echo esc_url( HANDYMAN_CLEANER_BUY_BUNDLE ); ?>" target="_blank"><?php esc_html_e( 'Buy Bundle at $99', 'handyman-cleaner' ); ?></a>
							</div>
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','handyman-cleaner'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( HANDYMAN_CLEANER_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','handyman-cleaner'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','handyman-cleaner'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','handyman-cleaner'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','handyman-cleaner'); ?></a> <?php esc_html_e( 'your website.','handyman-cleaner'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','handyman-cleaner'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( HANDYMAN_CLEANER_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','handyman-cleaner'); ?></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 Handyman Cleaner Theme', 'handyman-cleaner' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Handyman Cleaner is your gateway to a professional and visually stunning online presence, tailored specifically for handyman services, cleaning businesses, and home improvement professionals. Designed for repair services, renovation experts, maintenance work, residential cleaning, DIY projects, janitorial services, commercial cleaning, property maintenance, general contracting, office cleaning providers, tool repair businesses, and even laundrette services, this theme combines functionality with a sleek and modern design to connect with your target audience effectively. It is also ideal for individuals such as a housewife managing home-based cleaning or laundry services, helping them establish a strong digital presence. The clean and intuitive layout ensures visitors focus on your brand, while the responsive design guarantees flawless performance across desktops, tablets, and mobile devices. With a strong emphasis on showcasing service offerings, customer testimonials, and portfolio highlights, Handyman Cleaner empowers businesses to create a compelling digital presence. Integrated features like SEO optimization, fast loading speed, and social media connectivity enhance online visibility, ensuring you reach a wider audience. Customization options allow businesses to align their website with their brand identity through tailored color schemes, fonts, and layout adjustments. Highlighting contact details, pricing plans, and special offers, this theme strategically guides visitors through the conversion funnel to boost engagement and bookings. Compatible with popular plugins like Contact Form 7 for inquiries and lead generation, Handyman Cleaner is more than a template it’s a complete solution for building trust, driving conversions, and expanding your client base. ', 'handyman-cleaner' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','handyman-cleaner'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','handyman-cleaner'); ?></a> <?php esc_html_e( 'your website.','handyman-cleaner'); ?> </l>
								<li><?php esc_html_e( 'Handyman Cleaner','handyman-cleaner'); ?> <a target="_blank" href="<?php echo esc_url( HANDYMAN_CLEANER_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','handyman-cleaner'); ?></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.','handyman-cleaner'); ?></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', 'handyman-cleaner'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','handyman-cleaner'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'Handyman Cleaner is your gateway to a professional and visually stunning online presence, tailored specifically for handyman services, cleaning businesses, and home improvement professionals. Designed for repair services, renovation experts, maintenance work, residential cleaning, DIY projects, janitorial services, home repair, commercial cleaning, property maintenance, upkeep solutions, professional cleaning, fixing services, task management, general contracting, tool-based businesses, and improvement projects, this theme combines functionality with a sleek and modern design to connect with your target audience effectively. The clean and intuitive layout ensures visitors focus on your brand, while the responsive design guarantees flawless performance across desktops, tablets, and mobile devices. With a strong emphasis on showcasing service offerings, customer testimonials, and portfolio highlights, Handyman Cleaner empowers businesses to create a compelling digital presence. Integrated features like SEO optimization, fast loading speed, and social media connectivity enhance online visibility, ensuring you reach a wider audience. Customization options allow businesses to align their website with their brand identity through tailored color schemes, fonts, and layout adjustments. Highlighting contact details, pricing plans, and special offers, this theme strategically guides visitors through the conversion funnel to boost engagement and bookings. Perfect for local services, cleaning startups, independent contractors, renovation specialists, home fix experts, office cleaning providers, and tool repair businesses, this platform is more than a website—its a comprehensive solution for building trust and expanding your client base.The theme boasts a clean and intuitive design, ensuring that visitors immediately connect with your brand. With a focus on showcasing services and promoting your expertise, the Handyman Cleaner WordPress Theme provides an eye-catching platform to engage potential clients. This theme not only enhances your digital storefront but also brings a host of benefits to streamline your online operations. Its user-friendly customization options empower you to tailor the website to match your brand identity seamlessly. Highlighting your services, customer testimonials, and contact details, the theme strategically guides visitors through the conversion funnel. Beyond aesthetics, the Handyman Cleaner WordPress Theme is optimized for performance and responsiveness, ensuring a seamless experience across devices. Its fast-loading pages contribute to an enhanced user experience, positively impacting your online credibility. Moreover, the themes SEO-friendly structure facilitates higher visibility on search engines, attracting a wider audience. Social media integration further amplifies your reach, allowing you to connect with potential clients on various platforms. The Handyman Cleaner WordPress Theme is more than just a website template; its a powerful tool for a handyman and cleaning professionals to establish a strong online presence.', 'handyman-cleaner' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','handyman-cleaner'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Theme options using Customizer API','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Responsive design','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Site Icon and Logo option','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Header Images option','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Favicon, Logo, title, and tagline customization','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Pagination option','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Demo Importer','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Main Slider','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Woocommerce Compatible','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Unlimited Slides','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Section to show categories','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Product Listing based on category','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Top Categories Section','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Best Seller Tab','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Testimonial with custom post type','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Promotional Banners','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Shortcodes for Testimonials','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Newsletter with the help of contact form 7.','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Well-sanitized as per WordPress standards.','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Responsive layout for all devices','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Typography for the complete website','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Global Color pallete','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Section specific Color pallete','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Fully integrated with Font Awesome Icon','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Instagram Section','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Background Image Option','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Custom page templates','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Allow setting site title, tagline, logo','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Contact Page Template','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Blog Full width and right and left sidebar','handyman-cleaner'); ?></li>
									<li><?php esc_html_e( 'Recent post widget with images, Related post','handyman-cleaner'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<?php }?>
