<?php

add_action( 'admin_menu', 'fast_food_truck_gettingstarted' );
function fast_food_truck_gettingstarted() {
	add_theme_page( esc_html__('About Theme', 'fast-food-truck'), esc_html__('Theme Demo Import', 'fast-food-truck'), 'edit_theme_options', 'fast-food-truck-guide-page', 'fast_food_truck_guide');
}

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

    // Admin notice code START
	wp_register_script('fast-food-truck-notice', esc_url(get_template_directory_uri()) . '/inc/dashboard/js/notice.js', array('jquery'), time(), true);
	wp_enqueue_script('fast-food-truck-notice');
	// Admin notice code END
}
add_action('admin_enqueue_scripts', 'fast_food_truck_admin_theme_style');

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

function fast_food_truck_notice(){
    // Hide permanently if dismissed
    if ( get_option('fast_food_truck_admin_notice') == 1 ) {
        return;
    }
    // Hide ONLY on Get Started page
    if ( isset($_GET['page']) && $_GET['page'] === 'fast-food-truck-guide-page' ) {
        return;
    }?>
    <div id="fast-food-truck-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 Fast Food Truck, You Rock!', 'fast-food-truck' ) ?> </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.', 'fast-food-truck' ) ?></p>
				<div style="display: grid;">
					<a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=fast-food-truck-guide-page' )); ?>"><?php esc_html_e( 'Get Started', 'fast-food-truck' ) ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( FAST_FOOD_TRUCK_BUY_BUNDLE ); ?>"><?php esc_html_e('Get Bundle', 'fast-food-truck') ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( FAST_FOOD_TRUCK_LIVE_DEMO ); ?>"><?php esc_html_e('Pro Demo', 'fast-food-truck') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( FAST_FOOD_TRUCK_BUY_PRO ); ?>"><?php esc_html_e('Upgrade To Pro', 'fast-food-truck') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( FAST_FOOD_TRUCK_FREE_DOC ); ?>"><?php esc_html_e('Free Doc', 'fast-food-truck') ?></a>
				</div>
			</div>
		</div>
	</div>
	<?php 
}

//Hook (VERY IMPORTANT)
add_action('admin_notices', 'fast_food_truck_notice');

// Admin notice code START
add_action('wp_ajax_fast_food_truck_dismiss_notice', 'fast_food_truck_dismiss_notice');
function fast_food_truck_dismiss_notice() {
    update_option('fast_food_truck_admin_notice', 1);
    wp_die();
}

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

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

	// Theme info
	$fast_food_truck_return = add_query_arg( array()) ;
	$fast_food_truck_theme = wp_get_theme( 'fast-food-truck' ); ?>

	<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', 'fast-food-truck' ); ?></span>
						<h2 class="bwp-bundle-banner__title"><?php esc_html_e( '250+ Premium WordPress Themes in One Bundle', 'fast-food-truck' ); ?></h2>
						<p class="bwp-bundle-banner__desc">
							<strong><?php esc_html_e( 'SUMMER SALE!', 'fast-food-truck' ); ?></strong>
							<?php esc_html_e( 'Get 15% off on a Bundle of 250+ Premium WP Themes. Use', 'fast-food-truck' ); ?>
							<span class="bwp-bundle-banner__coupon-inline">&quot;SUMMER15&quot;</span>
							<?php esc_html_e( 'at Checkout.', 'fast-food-truck' ); ?>
						</p>
						<div class="bwp-bundle-banner__actions">
							<a class="bwp-bundle-banner__cta" target="_blank" href="<?php echo esc_url( FAST_FOOD_TRUCK_BUY_BUNDLE ); ?>"><?php esc_html_e( 'Get Bundle Just at $99', 'fast-food-truck' ); ?><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', 'fast-food-truck' ); ?>">
								<span class="bwp-bundle-banner__coupon-label"><?php esc_html_e( 'Coupon Code', 'fast-food-truck' ); ?></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!', 'fast-food-truck' ); ?></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', 'fast-food-truck' ); ?></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="fast_food_truck_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'fast-food-truck' ); ?></button>
				<button role="tab" class="tablinks" onclick="fast_food_truck_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'fast-food-truck' ); ?></button>
				<button role="tab" class="tablinks" onclick="fast_food_truck_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'fast-food-truck' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( FAST_FOOD_TRUCK_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'fast-food-truck' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( FAST_FOOD_TRUCK_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'fast-food-truck' ); ?>
				</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 Fast Food Truck ', 'fast-food-truck' ); ?>
							<span><?php esc_html_e( 'Version: ', 'fast-food-truck' ); ?><?php echo esc_html($fast_food_truck_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.', 'fast-food-truck' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'fast-food-truck' ); ?></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...', 'fast-food-truck'); ?>" />
								</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', 'fast-food-truck'); ?>" />
							<div class="install-plugins__actions">
								<a class="install-plugins__btn install-plugins__btn--pro" href="<?php echo esc_url( FAST_FOOD_TRUCK_BUY_PRO ); ?>" target="_blank"><?php esc_html_e( 'Get Pro at $39', 'fast-food-truck' ); ?></a>
								<a class="install-plugins__btn install-plugins__btn--bundle" href="<?php echo esc_url( FAST_FOOD_TRUCK_BUY_BUNDLE ); ?>" target="_blank"><?php esc_html_e( 'Buy Bundle at $99', 'fast-food-truck' ); ?></a>
							</div>
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','fast-food-truck'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( FAST_FOOD_TRUCK_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','fast-food-truck'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','fast-food-truck'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','fast-food-truck'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','fast-food-truck'); ?></a> <?php esc_html_e( 'your website.','fast-food-truck'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','fast-food-truck'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( FAST_FOOD_TRUCK_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','fast-food-truck'); ?></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 Fast Food Truck Theme', 'fast-food-truck' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e('Fast Food Truck is the ultimate solution for businesses in the fast food and mobile food industry across every city, designed specifically for food trucks, street food vendors, catering services, snack stalls, mobile kitchens, food carts, meal vans, pop-up food stalls, takeaway kiosks, fast-casual dining, food delivery services, online food ordering, gourmet food trucks, roadside meal businesses, burger trucks, taco trucks, pizza trucks, sushi trucks, BBQ trucks, grill trucks, seafood trucks, coffee trucks, juice trucks, dessert trucks, vegan food trucks, fusion food trucks, snack bars, and vendors offering cuisines like fish and chips, lobster rolls, shrimp dishes, burritos, wraps, hot dogs, falafel, or gourmet sandwiches in any modern city market. Compatible with top plugins like WooCommerce for online ordering and payments, Contact Form 7 for lead generation, Yoast SEO for search optimization, and Mailchimp for email marketing, it enhances functionality and customer engagement while supporting features like interactive food menus, reservation pages, menu showcases, catering options, food truck schedules, online bookings, event updates, promotional offers, daily specials, combo meals, and featured dishes tailored for a competitive city audience. The theme’s customizable layout allows you to highlight top sellers, showcase popular dishes, and emphasize your food truck’s expertise, making it easier to stand out in a crowded city food scene. Optimized for SEO, mobile responsiveness, fast loading speed, user experience, local search rankings, performance, online ordering, food delivery, takeaway services, and social media integration, Fast Food Truck is the ideal choice for food truck websites, catering businesses, quick service brands, street food outlets, and fast food delivery services aiming to boost online visibility, attract customers, and expand their business efficiently in any growing city environment. ', 'fast-food-truck' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','fast-food-truck'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','fast-food-truck'); ?></a> <?php esc_html_e( 'your website.','fast-food-truck'); ?> </l>
								<li><?php esc_html_e( 'Fast Food Truck','fast-food-truck'); ?> <a target="_blank" href="<?php echo esc_url( FAST_FOOD_TRUCK_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','fast-food-truck'); ?></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.','fast-food-truck'); ?></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', 'fast-food-truck'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','fast-food-truck'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'The Fast Food Truck is the perfect solution for fast food businesses looking to establish a robust online presence. Designed specifically for food trucks, this theme is ideal for gourmet food trucks, street food vendors, and mobile kitchens. Whether youre running a taco truck, burger truck, pizza truck, sushi truck, BBQ truck, grill truck, seafood truck, fish and chips truck, lobster truck, or shrimp truck, this theme caters to create a perfect website for fast food. The Fast Food Truck WordPress Theme is packed with features to help you showcase your delicious offerings and attract more customers. Its sleek, responsive design ensures your website looks great on any device, providing a seamless browsing experience for users on the go. With dedicated pages for menus, reservations, and online ordering, you can streamline your operations and enhance customer convenience. Highlight your top dishes with the Top Seller section. The Free Food Truck can also be integrated with the popular plugins such as Woocommerce, Contact Form7, Jetpack, Yoast SEO and Product Filter Plugins to give your website more functionality with proper payment gateways and support. Whether youre offering food truck catering or serving delicious street food, the Fast Food Truck WordPress Theme empowers you to create a professional and enticing online presence. Transform your food truck business today and start reaching more customers with this dynamic, feature-rich theme.', 'fast-food-truck' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','fast-food-truck'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Theme options using Customizer API','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Responsive design','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Site Icon and Logo option','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Header Images option','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Favicon, Logo, title, and tagline customization','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets','fast-food-truck'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Pagination option','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Demo Importer','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Main Slider','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Woocommerce Compatible','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Unlimited Slides','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Section to show categories','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Product Listing based on category','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Top Categories Section','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Best Seller Tab','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Testimonial with custom post type','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Promotional Banners','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Shortcodes for Testimonials','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Newsletter with the help of contact form 7.','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Well-sanitized as per WordPress standards.','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Responsive layout for all devices','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Typography for the complete website','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Global Color pallete','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Section specific Color pallete','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Fully integrated with Font Awesome Icon','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Instagram Section','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Partner Listing','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Background Image Option','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Custom page templates','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Allow setting site title, tagline, logo','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Contact Page Template','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Blog Full width and right and left sidebar','fast-food-truck'); ?></li>
									<li><?php esc_html_e( 'Recent post widget with images, Related post','fast-food-truck'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<?php }?>
