<?php

add_action( 'admin_menu', 'automobile_car_dealer_gettingstarted' );
function automobile_car_dealer_gettingstarted() {    	
	add_theme_page( esc_html__('About Theme', 'automobile-car-dealer'), esc_html__('Theme Demo Import', 'automobile-car-dealer'), 'edit_theme_options', 'automobile-car-dealer-guide-page', 'automobile_car_dealer_guide');   
}

function automobile_car_dealer_admin_theme_style() {
   wp_enqueue_style('automobile-car-dealer-custom-admin-style', esc_url(get_template_directory_uri()) . '/inc/dashboard/get_started_info.css');
   wp_enqueue_script('automobile-car-dealer-tab', esc_url( get_template_directory_uri() ) . '/inc/dashboard/js/get_started_tab.js');

   // Admin notice code START
	wp_register_script('automobile-car-dealer-notice', esc_url(get_template_directory_uri()) . '/inc/dashboard/js/notice.js', array('jquery'), time(), true);
	wp_enqueue_script('automobile-car-dealer-notice');
	// Admin notice code END
}
add_action('admin_enqueue_scripts', 'automobile_car_dealer_admin_theme_style');

// Notice after Theme Activation
function automobile_car_dealer_notice(){
    global $pagenow;
    if ( is_admin() && $pagenow === 'themes.php' && (!isset($_GET['page']) || $_GET['page'] !== 'automobile-car-dealer-guide-page')
) {
$automobile_car_dealer_meta = get_option( 'automobile_car_dealer_admin_notice' );
	if (!$automobile_car_dealer_meta) {?>
    <div id="automobile-car-dealer-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 Automobile Car Dealer, You Rock!', 'automobile-car-dealer' ) ?> </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.', 'automobile-car-dealer' ) ?></p>
				<div style="display: grid;">
					<a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=automobile-car-dealer-guide-page' )); ?>"><?php esc_html_e( 'Get Started', 'automobile-car-dealer' ) ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_LIVE_DEMO ); ?>"><?php esc_html_e('Pro Demo', 'automobile-car-dealer') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_BUY_PRO ); ?>"><?php esc_html_e('Upgrade To Pro', 'automobile-car-dealer') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_FREE_DOC ); ?>"><?php esc_html_e('Free Doc', 'automobile-car-dealer') ?></a>
				</div>

			</div>
		</div>
	</div>
	<?php }
}
}
add_action('admin_notices', 'automobile_car_dealer_notice');

// Admin notice code START
function automobile_car_dealer_dismissed_notice() {
	update_option( 'automobile_car_dealer_admin_notice', true );
}
add_action( 'wp_ajax_automobile_car_dealer_dismissed_notice', 'automobile_car_dealer_dismissed_notice' );

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

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

	// Theme info
	$automobile_car_dealer_return = add_query_arg( array()) ;
	$automobile_car_dealer_theme = wp_get_theme( 'automobile-car-dealer' ); ?>

	<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="automobile_car_dealer_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'automobile-car-dealer' ); ?></button>
				<button role="tab" class="tablinks" onclick="automobile_car_dealer_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'automobile-car-dealer' ); ?></button>
				<button role="tab" class="tablinks" onclick="automobile_car_dealer_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'automobile-car-dealer' ); ?></button>
				<a class="tablinks" role="tab" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'automobile-car-dealer' ); ?>
				</a>
				<a class="tablinks" role="tab" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'automobile-car-dealer' ); ?>
				</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 Automobile Car Dealer ', 'automobile-car-dealer' ); ?>
							<span><?php esc_html_e( 'Version: ', 'automobile-car-dealer' ); ?><?php echo esc_html($automobile_car_dealer_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.', 'automobile-car-dealer' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'automobile-car-dealer' ); ?></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...', 'automobile-car-dealer'); ?>" />
								</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', 'automobile-car-dealer'); ?>" />
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','automobile-car-dealer'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','automobile-car-dealer'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_PRO_SUPPORT ); ?>"><?php esc_html_e( 'Premium Theme Support','automobile-car-dealer'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','automobile-car-dealer'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','automobile-car-dealer'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','automobile-car-dealer'); ?></a> <?php esc_html_e( 'your website.','automobile-car-dealer'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','automobile-car-dealer'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','automobile-car-dealer'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_PRO_DOC ); ?>"><?php esc_html_e( 'Premium Theme Documentation','automobile-car-dealer'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Buy Premium','automobile-car-dealer'); ?></h3>
							<ol>
								<a href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Pro', 'automobile-car-dealer'); ?></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 Automobile Car Dealer Theme', 'automobile-car-dealer' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Automobile Car Dealer theme is a responsive and SEO-friendly automotive theme created by professionals with optimized code and interactive design to make it secure, fast, and visually stunning. Perfect for new and used car dealers, auto dealerships, vehicle showrooms, garages, car repair services, auto service shops, small car dealer businesses, and automotive sales platforms, this theme provides everything needed to manage and promote your dealership online. It supports a wide range of automotive needs including car sales, car inventory management, vehicle listings, car trade-ins, auto financing, leasing options, certified pre-owned cars, and used car specials. Built with a car listing and inventory management plugin, it allows you to easily display vehicles, manage car details, pricing, and promotions. The themes flexible customization options, clean layout, and mobile responsiveness make it ideal for showcasing vehicles, car warranty services, repair and maintenance offerings, tires and wheels, or even car washes and mechanic shops. With features like a custom menu, footer widgets, left sidebar, and logo upload, it lets you present your automotive portfolio professionally. Designed for both aesthetics and functionality, it enhances user experience with call-to-action buttons, landing page layouts, and integrated social media sharing—making it a complete solution for car dealers, wheel shops, motorcycle sellers, and automotive service providers aiming to boost sales, visibility, and customer engagement.', 'automobile-car-dealer' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','automobile-car-dealer'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','automobile-car-dealer'); ?></a> <?php esc_html_e( 'your website.','automobile-car-dealer'); ?> </l>
								<li><?php esc_html_e( 'Automobile Car Dealer','automobile-car-dealer'); ?> <a target="_blank" href="<?php echo esc_url( AUTOMOBILE_CAR_DEALER_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','automobile-car-dealer'); ?></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.','automobile-car-dealer'); ?></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', 'automobile-car-dealer'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','automobile-car-dealer'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'The premium Automotive WordPress theme is a multipurpose theme for all the automobile businesses. It is designed keeping in mind the wide range of purposes it is going to fulfill. It can be used for the business of car and/or truck lift, resale vehicle, automobile manufacturing unit, automobile showroom etc. It is jam-packed with all the overwhelmingly amazing features that you wish to see on your site. It is important to have a good website design to reflect your good business skills and valuable services. This theme will give the best professional look to your business. Its easy navigation and user-friendly interface will make visitors experience soothing. It is developed and well written by our expert developers to make it bug-free. This ultimately makes it SEO friendly hence ranking it higher in Google search. The unique design of our premium Automotive WordPress theme makes your site stand out among hundreds of other sites. It has all the possible colours in its colour palette to give any colour to your website. These all features in your site will definitely attract more customers towards it.', 'automobile-car-dealer' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','automobile-car-dealer'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Car listing Shortcode with category','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Car listing Shortcode','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Multiple image feature for each property with slider.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Brand Listing Section','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Car Brand(categories) Option','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Car Tags(categories) Option','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Testimonial listing.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Testimonial shortcode.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Social icons widget.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Latest post with the image widget.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Live customize editor for the About US section.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Font Awesome integrated.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Well sanitized as per WordPress standards.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Allow to set site title, tagline, logo.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page.','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Footer Widgets & Editor style','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Gallery & Banner functionality','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Full-width Template','automobile-car-dealer'); ?></li>
									<li><?php esc_html_e( 'Custom Menu, Colors Editor','automobile-car-dealer'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<?php }?>