<?php

add_action( 'admin_menu', 'home_repair_service_gettingstarted' );
function home_repair_service_gettingstarted() {
	add_theme_page( esc_html__('About Theme', 'home-repair-service'), esc_html__('Theme Demo Import', 'home-repair-service'), 'edit_theme_options', 'home-repair-service-guide-page', 'home_repair_service_guide');
}

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

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

// Notice after Theme Activation
function home_repair_service_notice(){
    global $pagenow;
    if ( is_admin() && $pagenow === 'themes.php' && (!isset($_GET['page']) || $_GET['page'] !== 'home-repair-service-guide-page')
) {
$home_repair_service_meta = get_option( 'home_repair_service_admin_notice' );
	if (!$home_repair_service_meta) {?>
    <div id="home-repair-service-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 Repair Service, You Rock!', 'home-repair-service' ) ?> </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.', 'home-repair-service' ) ?></p>
				<div style="display: grid;">
					<a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=home-repair-service-guide-page' )); ?>"><?php esc_html_e( 'Get Started', 'home-repair-service' ) ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( HOME_REPAIR_SERVICE_LIVE_DEMO ); ?>"><?php esc_html_e('Pro Demo', 'home-repair-service') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( HOME_REPAIR_SERVICE_BUY_PRO ); ?>"><?php esc_html_e('Upgrade To Pro', 'home-repair-service') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( HOME_REPAIR_SERVICE_FREE_DOC ); ?>"><?php esc_html_e('Free Doc', 'home-repair-service') ?></a>
				</div>
			</div>
		</div>
	</div>
	<?php }
}
}
add_action('admin_notices', 'home_repair_service_notice');

// Admin notice code START
function home_repair_service_dismissed_notice() {
	update_option( 'home_repair_service_admin_notice', true );
}
add_action( 'wp_ajax_home_repair_service_dismissed_notice', 'home_repair_service_dismissed_notice' );

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

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

	// Theme info
	$home_repair_service_return = add_query_arg( array()) ;
	$home_repair_service_theme = wp_get_theme( 'home-repair-service' ); ?>

	<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_repair_service_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'home-repair-service' ); ?></button>
				<button role="tab" class="tablinks" onclick="home_repair_service_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'home-repair-service' ); ?></button>
				<button role="tab" class="tablinks" onclick="home_repair_service_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'home-repair-service' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( HOME_REPAIR_SERVICE_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'home-repair-service' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( HOME_REPAIR_SERVICE_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'home-repair-service' ); ?>
				</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 Repair Service ', 'home-repair-service' ); ?>
							<span><?php esc_html_e( 'Version: ', 'home-repair-service' ); ?><?php echo esc_html($home_repair_service_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-repair-service' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'home-repair-service' ); ?></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-repair-service'); ?>" />
								</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', 'home-repair-service'); ?>" />
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','home-repair-service'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( HOME_REPAIR_SERVICE_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','home-repair-service'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( HOME_REPAIR_SERVICE_PRO_SUPPORT ); ?>"><?php esc_html_e( 'Premium Theme Support','home-repair-service'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','home-repair-service'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','home-repair-service'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','home-repair-service'); ?></a> <?php esc_html_e( 'your website.','home-repair-service'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','home-repair-service'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( HOME_REPAIR_SERVICE_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','home-repair-service'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( HOME_REPAIR_SERVICE_PRO_DOC ); ?>"><?php esc_html_e( 'Premium Theme Documentation','home-repair-service'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Buy Premium','home-repair-service'); ?></h3>
							<ol>
								<a href="<?php echo esc_url( HOME_REPAIR_SERVICE_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Pro', 'home-repair-service'); ?></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 Repair Service Theme', 'home-repair-service' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'The Home Repair Service Theme is a feature-rich solution designed for handyman services, general contractors, and home maintenance professionals aiming to build a strong online presence, incorporating relevant search terms such as home repair services, handyman services, handyman near me, local contractor services, home improvement solutions, house renovation services, remodeling services, repair specialist, property maintenance services, plumbing services, electrical services, roofing services, HVAC services, appliance repair services, drywall repair, carpentry services, painting services, insulation installation, kitchen renovation services, smart home upgrades, emergency repair service, and home maintenance company, while also supporting niche offerings related to constrction, architecture, and specialized exterior work like housetop maintenance as well as utility-focused services such as laundrette setup and repair solutions. Whether your expertise includes house maintenance, home remodeling, renovation projects, or complete property upkeep, this theme offers a clean, professional, and user-friendly platform to showcase services and attract potential clients. Its modern, fully responsive layout ensures seamless performance across desktops, tablets, and mobile devices, enabling visitors to easily browse service offerings and request assistance. Packed with essential business features, it includes ready-made service sections, interactive contact forms, appointment booking support, pricing tables, fast-loading pages, SEO-friendly structure, schema markup, and social media integration to boost visibility and generate local leads. Suitable for both emergency repair work and long-term maintenance services, the theme’s flexible layouts, customizable color schemes, and advanced typography options help create a distinctive brand identity. Fully compatible with the Contact Form 7 plugin, it simplifies inquiries, service requests, and customer communication, making it an ideal digital solution for contractors, repair specialists, and property management businesses.', 'home-repair-service' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','home-repair-service'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','home-repair-service'); ?></a> <?php esc_html_e( 'your website.','home-repair-service'); ?> </l>
								<li><?php esc_html_e( 'Home Repair Service','home-repair-service'); ?> <a target="_blank" href="<?php echo esc_url( HOME_REPAIR_SERVICE_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','home-repair-service'); ?></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.','home-repair-service'); ?></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', 'home-repair-service'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','home-repair-service'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'The Home Repair Service WordPress Theme is a feature-rich solution tailored for handyman services, general contractors, and home maintenance professionals looking to establish a robust online presence. Whether your expertise lies in home repair services, house maintenance, home remodeling, or property maintenance, this theme offers a sleek, professional, and user-friendly platform to showcase your skills and attract more clients. Its modern, fully responsive layout ensures that your website adapts to any screen size, providing a seamless browsing experience across desktops, tablets, and smartphones. Users can easily navigate through your comprehensive service offerings, including plumbing, electrical, drywall, roofing, HVAC, appliance repair, and home automation installations. The theme is packed with essential business tools, including pre-built service pages, interactive contact forms, appointment booking integration, and pricing tables, making it easy for customers to schedule repairs and request estimates. With fast-loading pages, SEO-friendly structure, schema markup, and social media integration, your home repair business can enhance its online visibility and attract more local leads. Whether you provide emergency repairs, kitchen renovation, insulation installation, carpentry, painting, or smart home upgrades, this themes customizable layouts, unlimited color options, and advanced typography settings help you create a unique and branded website. Designed to streamline customer engagement and simplify online booking, this feature-packed theme is the ultimate digital solution for contractors, home improvement businesses, and handyman service providers. Compatible with the Contact Form 7 plugin, it ensures smooth form submissions and better client communication. ', 'home-repair-service' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','home-repair-service'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Theme options using Customizer API','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Responsive design','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Site Icon and Logo option','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Header Images option','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Favicon, Logo, title, and tagline customization','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets','home-repair-service'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Pagination option','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Demo Importer','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Main Slider','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Woocommerce Compatible','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Unlimited Slides','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Section to show categories','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Product Listing based on category','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Top Categories Section','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Best Seller Tab','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Testimonial with custom post type','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Promotional Banners','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Shortcodes for Testimonials','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Newsletter with the help of contact form 7.','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Well-sanitized as per WordPress standards.','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Responsive layout for all devices','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Typography for the complete website','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Global Color pallete','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Section specific Color pallete','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Fully integrated with Font Awesome Icon','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Instagram Section','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Background Image Option','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Custom page templates','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Allow setting site title, tagline, logo','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Contact Page Template','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Blog Full width and right and left sidebar','home-repair-service'); ?></li>
									<li><?php esc_html_e( 'Recent post widget with images, Related post','home-repair-service'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<?php }?>
