<?php

add_action( 'admin_menu', 'transport_movers_gettingstarted' );
function transport_movers_gettingstarted() {    	
	add_theme_page( esc_html__('About Theme', 'transport-movers'), esc_html__('Theme Demo Import', 'transport-movers'), 'edit_theme_options', 'transport-movers-guide-page', 'transport_movers_guide');   
}

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

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

// Notice after Theme Activation
function transport_movers_notice(){
    // Hide permanently if dismissed
    if ( get_option('transport_movers_admin_notice') == 1 ) {
        return;
    }
    // Hide ONLY on Get Started page
    if ( isset($_GET['page']) && $_GET['page'] === 'transport-movers-guide-page' ) {
        return;
    }  {?>
    <div id="transport-movers-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 Transport Movers, You Rock!', 'transport-movers' ) ?> </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.', 'transport-movers' ) ?></p>
				<div style="display: grid;">
					<a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=transport-movers-guide-page' )); ?>"><?php esc_html_e( 'Get Started', 'transport-movers' ) ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( TRANSPORT_MOVERS_LIVE_DEMO ); ?>"><?php esc_html_e('Pro Demo', 'transport-movers') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( TRANSPORT_MOVERS_BUY_PRO ); ?>"><?php esc_html_e('Upgrade To Pro', 'transport-movers') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( TRANSPORT_MOVERS_FREE_DOC ); ?>"><?php esc_html_e('Free Doc', 'transport-movers') ?></a>
				</div>

			</div>
		</div>
	</div>
	<?php }
}
//Hook (VERY IMPORTANT)
add_action('admin_notices', 'transport_movers_notice');

// Admin notice code START
add_action('wp_ajax_transport_movers_dismiss_notice', 'transport_movers_dismiss_notice');
function transport_movers_dismiss_notice() {
    update_option('transport_movers_admin_notice', 1);
    wp_die();
}

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

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

	// Theme info
	$transport_movers_return = add_query_arg( array()) ;
	$transport_movers_theme = wp_get_theme( 'transport-movers' ); ?>

	<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="transport_movers_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'transport-movers' ); ?></button>
				<button role="tab" class="tablinks" onclick="transport_movers_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'transport-movers' ); ?></button>
				<button role="tab" class="tablinks" onclick="transport_movers_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'transport-movers' ); ?></button>
				<a class="tablinks" role="tab" href="<?php echo esc_url( TRANSPORT_MOVERS_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'transport-movers' ); ?>
				</a>
				<a class="tablinks" role="tab" href="<?php echo esc_url( TRANSPORT_MOVERS_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'transport-movers' ); ?>
				</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 Transport Movers ', 'transport-movers' ); ?>
							<span><?php esc_html_e( 'Version: ', 'transport-movers' ); ?><?php echo esc_html($transport_movers_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.', 'transport-movers' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'transport-movers' ); ?></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...', 'transport-movers'); ?>" />
								</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', 'transport-movers'); ?>" />
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','transport-movers'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( TRANSPORT_MOVERS_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','transport-movers'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( TRANSPORT_MOVERS_PRO_SUPPORT ); ?>"><?php esc_html_e( 'Premium Theme Support','transport-movers'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','transport-movers'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','transport-movers'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','transport-movers'); ?></a> <?php esc_html_e( 'your website.','transport-movers'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','transport-movers'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( TRANSPORT_MOVERS_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','transport-movers'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( TRANSPORT_MOVERS_PRO_DOC ); ?>"><?php esc_html_e( 'Premium Theme Documentation','transport-movers'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Buy Premium','transport-movers'); ?></h3>
							<ol>
								<a href="<?php echo esc_url( TRANSPORT_MOVERS_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Pro', 'transport-movers'); ?></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 Transport Movers Theme', 'transport-movers' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Transport Movers is a professional theme crafted to build a strong online presence for transport, logistics, and moving service businesses, making it ideal for transport companies, logistics firms, carrier services, packers and movers, courier services, shipping companies, freight services, cargo management providers, postal and parcel services, and express delivery operations. It suits businesses offering local movers, long-distance moving, international relocation, house shifting, office relocation, furniture transport, storage solutions, and packing services, while also supporting car transport and emergency evacuation services, adapting seamlessly to diverse transportation needs. Integrated with an advanced Live Vehicle Tracking Map plugin essential for logistics operations, the theme supports real-time vehicle tracking, route planning, location updates, and delivery status monitoring, including specialized tracking for car shipments and urgent evacuation logistics. Its clean and minimal design ensures smooth navigation, while the fully responsive layout performs flawlessly across all modern browsers and devices. Features such as service showcases, customer testimonials, quote request forms, and customizable backgrounds help build credibility and boost engagement. With lightweight, SEO-optimized code, it delivers fast loading speeds and improved search visibility. Translation-ready with RTL support, Transport Movers provides a modern, user-friendly interface perfect for presenting transport solutions, logistics management services, professional moving operations, car relocation, and emergency evacuation services efficiently.', 'transport-movers' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','transport-movers'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','transport-movers'); ?></a> <?php esc_html_e( 'your website.','transport-movers'); ?> </l>
								<li><?php esc_html_e( 'Transport Movers','transport-movers'); ?> <a target="_blank" href="<?php echo esc_url( TRANSPORT_MOVERS_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','transport-movers'); ?></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.','transport-movers'); ?></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', 'transport-movers'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','transport-movers'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'Transport WordPress theme is a visually appealing, elegant and clean multipurpose theme for all transport businesses. The theme has its usage in transport business, movers and packers, logistics, freight services, shipping and cargo business. It is the premium version of the free transport WordPress theme. It has a pool of useful features which makes it even more useful and different from other themes of the like. The theme is fully responsive and cross-browser compatible making your site accessible through mobile and tablets loading smoothly on all browsers. The customizability of the theme helps making it personalize. You can change its colour, background, images, header, footer, fonts etc. through theme option panel without involving into coding part. It is designed to cater smooth navigation through different pages and sections. Give a great experience to your visitors and convert a general visit to your site into potential lead for your business. The theme has user-friendly front and back end interface which will ease its use for you as well as your visitors.', 'transport-movers' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','transport-movers'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Theme options using customizer API','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Responsive design','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Favicon, Logo, title and tagline customization','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets','transport-movers'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Pagination option','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Fade Slider With different Tabs','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Unlimited Slides','transport-movers'); ?></li>
									<li><?php esc_html_e( 'About the Company section','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Services Listing','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Form to get a Free quote using Contact Form 7','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Pricing Plans section','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Seperate section to defind the flow of work','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Testimonial Section with shortcode','transport-movers'); ?></li>
									<li><?php esc_html_e( 'FAQ Section on Home with its shortcode','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Brand/Partner Listing Section','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Social Icon Widget, tagline, logo.','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Social Sharing On post','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Well sanitized as per WordPress standards.','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Responsive layout for all devices','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Fully integrated with Font Awesome Icon','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Background Image Option','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Custom page templates','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Allow to set site title, tagline, logo','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Contact Page Template','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Blog Full width and right and left sidebar','transport-movers'); ?></li>
									<li><?php esc_html_e( 'Recent post widget with images, Related post','transport-movers'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php }?>