<?php
/**
 * Packers And Movers Theme Page
 *
 * @package Packers And Movers
 */

function packers_and_movers_admin_scripts() {
	wp_dequeue_script('packers-and-movers-custom-scripts');
}
add_action( 'admin_enqueue_scripts', 'packers_and_movers_admin_scripts' );

if ( ! defined( 'PACKERS_AND_MOVERS_FREE_THEME_URL' ) ) {
	define( 'PACKERS_AND_MOVERS_FREE_THEME_URL', 'https://www.themespride.com/products/free-packers-wordpress-theme' );
}
if ( ! defined( 'PACKERS_AND_MOVERS_PRO_THEME_URL' ) ) {
	define( 'PACKERS_AND_MOVERS_PRO_THEME_URL', 'https://www.themespride.com/products/movers-wordpress-theme' );
}
if ( ! defined( 'PACKERS_AND_MOVERS_DEMO_THEME_URL' ) ) {
	define( 'PACKERS_AND_MOVERS_DEMO_THEME_URL', 'https://page.themespride.com/packers-and-movers-pro/' );
}
if ( ! defined( 'PACKERS_AND_MOVERS_DOCS_THEME_URL' ) ) {
    define( 'PACKERS_AND_MOVERS_DOCS_THEME_URL', 'https://page.themespride.com/demo/docs/packers-and-movers-lite' );
}
if ( ! defined( 'PACKERS_AND_MOVERS_RATE_THEME_URL' ) ) {
    define( 'PACKERS_AND_MOVERS_RATE_THEME_URL', 'https://wordpress.org/support/theme/packers-and-movers/reviews/#new-post' );
}
if ( ! defined( 'PACKERS_AND_MOVERS_CHANGELOG_THEME_URL' ) ) {
    define( 'PACKERS_AND_MOVERS_CHANGELOG_THEME_URL', get_template_directory() . '/readme.txt' );
}
if ( ! defined( 'PACKERS_AND_MOVERS_SUPPORT_THEME_URL' ) ) {
    define( 'PACKERS_AND_MOVERS_SUPPORT_THEME_URL', 'https://wordpress.org/support/theme/packers-and-movers/' );
}
if ( ! defined( 'PACKERS_AND_MOVERS_THEME_BUNDLE' ) ) {
    define( 'PACKERS_AND_MOVERS_THEME_BUNDLE', 'https://www.themespride.com/products/wordpress-theme-bundle' );
}

/**
 * Add theme page
 */
function packers_and_movers_menu() {
	add_theme_page( esc_html__( 'About Theme', 'packers-and-movers' ), esc_html__( 'Begin Installation - Import Demo', 'packers-and-movers' ), 'edit_theme_options', 'packers-and-movers-about', 'packers_and_movers_about_display' );
}
add_action( 'admin_menu', 'packers_and_movers_menu' );

/**
 * Display About page
 */
function packers_and_movers_about_display() {
	$packers_and_movers_theme = wp_get_theme();
	?>
	<div class="wrap about-wrap full-width-layout">
		<!-- top-detail -->
		<?php
		// Only show if NOT dismissed
		if ( ! get_option('dismissed-get_started-detail', false ) ) { 
		?>
		    <!-- top-detail -->
		    <div class="detail-theme" id="detail-theme-box">
		        <button type="button" class="close-btn" id="close-detail-theme">
		            <?php esc_html_e( 'Dismiss', 'packers-and-movers' ); ?>
		        </button>
		        <h2><?php echo esc_html__( 'Hey, Thank you for Installing Packers And Movers Theme!', 'packers-and-movers' ); ?></h2>

		        <a href="<?php echo esc_url( admin_url( 'themes.php?page=packers-and-movers-about' ) ); ?>">
		            <?php esc_html_e( 'Get Started', 'packers-and-movers' ); ?>
		        </a>
		        <a href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>" class="site-editor" target="_blank">
		            <?php esc_html_e( 'Site Editor', 'packers-and-movers' ); ?>
		        </a>

		        <a href="<?php echo esc_url( PACKERS_AND_MOVERS_PRO_THEME_URL ); ?>" class="pro-btn-theme" target="_blank">
		            <?php esc_html_e( 'Upgrade to Pro', 'packers-and-movers' ); ?>
		        </a>

		        <a href="<?php echo esc_url( PACKERS_AND_MOVERS_THEME_BUNDLE ); ?>" class="rate-theme" target="_blank">
		            <?php esc_html_e( 'Get Bundle', 'packers-and-movers' ); ?>
		        </a>
		    </div>
		<?php 
		} ?>
		
		<nav class="nav-tab-wrapper wp-clearfix packers-and-movers-tab-sec" aria-label="<?php esc_attr_e( 'Secondary menu', 'packers-and-movers' ); ?>">
		    <button class="nav-tab packers-and-movers-tablinks active"
		        onclick="packers_and_movers_open_tab(event, 'tp_demo_import')">
		        <?php esc_html_e( 'One Click Demo Import', 'packers-and-movers' ); ?>
		    </button>

		    <button class="nav-tab packers-and-movers-tablinks"
		        onclick="packers_and_movers_open_tab(event, 'tp_about_theme')">
		        <?php esc_html_e( 'About', 'packers-and-movers' ); ?>
		    </button>

		    <button class="nav-tab packers-and-movers-tablinks"
		        onclick="packers_and_movers_open_tab(event, 'tp_free_vs_pro')">
		        <?php esc_html_e( 'Compare Free Vs Pro', 'packers-and-movers' ); ?>
		    </button>

		    <button class="nav-tab packers-and-movers-tablinks"
		        onclick="packers_and_movers_open_tab(event, 'tp_changelog')">
		        <?php esc_html_e( 'Changelog', 'packers-and-movers' ); ?>
		    </button>

		    <button class="nav-tab packers-and-movers-tablinks blink wp-bundle"
		        onclick="packers_and_movers_open_tab(event, 'tp_get_bundle')">
		        <?php esc_html_e( 'Get WordPress Theme Bundle (140+ Themes)', 'packers-and-movers' ); ?>
		    </button>
		</nav>

		<?php
			packers_and_movers_demo_import();

			packers_and_movers_main_screen();

			packers_and_movers_changelog_screen();

			packers_and_movers_free_vs_pro();

			packers_and_movers_get_bundle();
		?>

		<p class="actions">
			<a target="_blank"href="<?php echo esc_url( PACKERS_AND_MOVERS_FREE_THEME_URL ); ?>" class="theme-info-btn" target="_blank" target="_blank"><?php esc_html_e( 'Theme Info', 'packers-and-movers' ); ?></a>
			<a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_DEMO_THEME_URL ); ?>" class="view-demo" target="_blank"><?php esc_html_e( 'View Demo', 'packers-and-movers' ); ?></a>
			<a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_DOCS_THEME_URL ); ?>" class="instruction-theme" target="_blank"><?php esc_html_e( 'Theme Documentation', 'packers-and-movers' ); ?></a>
			<a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_PRO_THEME_URL ); ?>" class="pro-btn-theme" target="_blank"><?php esc_html_e( 'Upgrade to pro', 'packers-and-movers' ); ?></a>
		</p>

		<h1><?php echo esc_html( $packers_and_movers_theme ); ?></h1>
		<div class="about-theme">
			<div class="theme-description">
				<p class="about-text content">
					<?php
					// Remove last sentence of description.
					$packers_and_movers_description = explode( '. ', $packers_and_movers_theme->get( 'Description' ) );
					array_pop( $packers_and_movers_description );

					$packers_and_movers_description = implode( '. ', $packers_and_movers_description );

					echo esc_html( $packers_and_movers_description . '.' );
				?></p>
				
			</div>
			<div class="theme-screenshot">
				<img src="<?php echo esc_url( $packers_and_movers_theme->get_screenshot() ); ?>" />
			</div>
		</div>
	<?php
}


/**
 * Output the Demo Import screen (JS tab based).
 */
function packers_and_movers_demo_import() {

	// Load whizzie demo importer
	$packers_and_movers_child_whizzie  = get_stylesheet_directory() . '/inc/whizzie.php';
	$packers_and_movers_parent_whizzie = get_template_directory() . '/inc/whizzie.php';

	if ( file_exists( $packers_and_movers_child_whizzie ) ) {
		require_once $packers_and_movers_child_whizzie;
	} elseif ( file_exists( $packers_and_movers_parent_whizzie ) ) {
		require_once $packers_and_movers_parent_whizzie;
	}

	/* ---------------------------------------------------------
	 * SAVE DEMO IMPORT STATUS
	 * --------------------------------------------------------- */
	if ( isset( $_GET['import-demo'] ) && $_GET['import-demo'] === 'true' ) {
		update_option( 'packers_and_movers_demo_imported', true );
		delete_option( 'packers_and_movers_demo_popup_shown' ); // allow popup once
	}

	/* ---------------------------------------------------------
	 * RESET DEMO (OPTIONAL)
	 * --------------------------------------------------------- */
	if ( isset( $_GET['reset-demo'] ) && $_GET['reset-demo'] === 'true' ) {
		delete_option( 'packers_and_movers_demo_imported' );
		delete_option( 'packers_and_movers_demo_popup_shown' );
		wp_safe_redirect( remove_query_arg( 'reset-demo' ) );
		exit;
	}

	$packers_and_movers_demo_imported  = get_option( 'packers_and_movers_demo_imported', false );
	$packers_and_movers_popup_shown    = get_option( 'packers_and_movers_demo_popup_shown', false );
	$packers_and_movers_show_popup_now = ( $packers_and_movers_demo_imported && ! $packers_and_movers_popup_shown );
	?>

	<div id="tp_demo_import" class="packers-and-movers-tabcontent">

	<?php if ( $packers_and_movers_demo_imported ) : ?>

		<!-- ================= SUCCESS STATE ================= -->
		<div class="content-row">
			<div class="col card success-demo text-center">
				<p class="imp-success">
					<?php esc_html_e( 'Demo Imported Successfully!', 'packers-and-movers' ); ?>
				</p><br>

				<div class="demo-button-three">
					<a class="button button-primary" href="<?php echo esc_url( home_url('/') ); ?>" target="_blank">
						<?php esc_html_e( 'View Site', 'packers-and-movers' ); ?>
					</a>

					<a class="button button-primary" href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>" target="_blank">
						<?php esc_html_e( 'Edit Site', 'packers-and-movers' ); ?>
					</a>

					<?php if ( defined( 'PACKERS_AND_MOVERS_DOCS_THEME_URL' ) ) : ?>
						<a class="button button-primary" href="<?php echo esc_url( PACKERS_AND_MOVERS_DOCS_THEME_URL ); ?>" target="_blank">
							<?php esc_html_e( 'Documentation', 'packers-and-movers' ); ?>
						</a>
					<?php endif; ?>
				</div>
			</div>
			<div class="theme-price col card">
				<div class="price-flex">
					<div class="price-content">
						<h3><?php esc_html_e( 'Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></h3>
						<p class="main-flash"><?php 
						  printf(
						    /* translators: 1: bold FLASH DEAL text, 2: discount code */
						    esc_html__( '%1$s - Get 20%% Discount on All Themes, Use code %2$s', 'packers-and-movers' ),
						    '<strong class="bold-text">' . esc_html__( 'FLASH DEAL', 'packers-and-movers' ) . '</strong>',
						    '<strong class="bold-text">' . esc_html__( 'QBSALE20', 'packers-and-movers' ) . '</strong>'
						  ); 
						  ?></p>
						 <p>
						  <del><?php echo esc_html__( '$59', 'packers-and-movers' ); ?></del>
						  <strong class="bold-price"><?php echo esc_html__( '$39', 'packers-and-movers' ); ?></strong>
						</p>
					</div>
					<div class="price-img">
						<img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/theme-img.png" alt="theme-img" />
					</div>
				</div>
				<div class="main-pro-price">
					<a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_PRO_THEME_URL ); ?>" class="pro-btn-theme price-pro" target="_blank"><?php esc_html_e( 'Upgrade To Premium Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></a>
				</div>
			</div>
		</div>

	<?php else : ?>

		<!-- ================= INSTALL STATE ================= -->
		<div class="content-row">
			<div class="col card demo-btn text-center">
				<form id="demo-importer-form" method="post">
					<p class="demo-title"><?php esc_html_e( 'Demo Importer', 'packers-and-movers' ); ?></p>
					<p class="demo-des">
						<?php esc_html_e( 'Import demo content with one click. You can customize everything later.', 'packers-and-movers' ); ?>
					</p>

					<button type="submit" class="button button-primary">
						<?php esc_html_e( 'Begin Installation – Import Demo', 'packers-and-movers' ); ?>
					</button>

					<div id="page-loader" style="display:none;margin-top:15px;">
						<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/images/loader.png' ); ?>" width="40">
						<p><?php esc_html_e( 'Importing demo, please wait...', 'packers-and-movers' ); ?></p>
					</div>
				</form>
			</div>
			<div class="theme-price col card">
				<div class="price-flex">
					<div class="price-content">
						<h3><?php esc_html_e( 'Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></h3>
						<p class="main-flash"><?php 
						  printf(
						    /* translators: 1: bold FLASH DEAL text, 2: discount code */
						    esc_html__( '%1$s - Get 20%% Discount on All Themes, Use code %2$s', 'packers-and-movers' ),
						    '<strong class="bold-text">' . esc_html__( 'FLASH DEAL', 'packers-and-movers' ) . '</strong>',
						    '<strong class="bold-text">' . esc_html__( 'QBSALE20', 'packers-and-movers' ) . '</strong>'
						  ); 
						  ?></p>
						 <p>
						  <del><?php echo esc_html__( '$59', 'packers-and-movers' ); ?></del>
						  <strong class="bold-price"><?php echo esc_html__( '$39', 'packers-and-movers' ); ?></strong>
						</p>
					</div>
					<div class="price-img">
						<img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/theme-img.png" alt="theme-img" />
					</div>
				</div>
				<div class="main-pro-price">
					<a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_PRO_THEME_URL ); ?>" class="pro-btn-theme price-pro" target="_blank"><?php esc_html_e( 'Upgrade To Premium Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></a>
				</div>
			</div>
		</div>

		<script>
		jQuery(function($){
			$('#demo-importer-form').on('submit', function(e){
				e.preventDefault();
				if(confirm('<?php esc_html_e( 'Are you sure you want to import demo content?', 'packers-and-movers' ); ?>')){
					$('#page-loader').show();
					let url = new URL(window.location.href);
					url.searchParams.set('import-demo','true');
					window.location.href = url;
				}
			});
		});
		</script>

	<?php endif; ?>

	</div>

	<?php if ( $packers_and_movers_show_popup_now ) : ?>
	<!-- ================= SUCCESS POPUP (ONLY ONCE) ================= -->
	<div id="demo-success-modal" class="modal-overlay">
		<div class="modal-content">
			<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/images/demo-icon.png' ); ?>" alt="">
			<h2><?php esc_html_e( 'Demo Successfully Imported!', 'packers-and-movers' ); ?></h2>

			<div class="modal-buttons">
				<a class="button button-primary" href="<?php echo esc_url( home_url('/') ); ?>" target="_blank">
					<?php esc_html_e( 'View Site', 'packers-and-movers' ); ?>
				</a>
				<a class="button button-primary" href="<?php echo esc_url( admin_url( 'themes.php?page=packers-and-movers-about' ) ); ?>">
					<?php esc_html_e( 'Go To Dashboard', 'packers-and-movers' ); ?>
				</a>
				<a class="button" href="<?php echo esc_url( admin_url( 'admin.php?page=appointment-booking-themes' ) ); ?>">
					<?php esc_html_e( 'View Premium Templates Starting at $39', 'packers-and-movers' ); ?>
				</a>
			</div>
		</div>
	</div>

	<script>
		document.addEventListener("DOMContentLoaded", function () {
			const modal = document.getElementById("demo-success-modal");
			if (!modal) return;

			modal.style.display = "flex";

			// Mark popup as permanently shown (only once)
			fetch('<?php echo esc_url( admin_url( 'admin-ajax.php?action=packers_and_movers_popup_done' ) ); ?>');

			// Close popup on ANY button click
			modal.querySelectorAll('a.button').forEach(function(btn){
				btn.addEventListener('click', function(){
					modal.style.display = "none";
				});
			});
		});
	</script>

	<?php endif; ?>

	<?php
}


/**
 * Output the main about screen.
 */
function packers_and_movers_main_screen() {
	
	?>
	<div id="tp_about_theme" class="packers-and-movers-tabcontent">
		<div class="content-row">
			<div class="feature-section two-col">
				<div class="col card">
					<h2 class="title"><?php esc_html_e( 'Theme Customizer', 'packers-and-movers' ); ?></h2>
					<p><?php esc_html_e( 'All Theme Options are available via Customize screen.', 'packers-and-movers' ) ?></p>
					<p><a target="_blank" href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Customize', 'packers-and-movers' ); ?></a></p>
				</div>

				<div class="col card">
					<h2 class="title"><?php esc_html_e( 'Got theme support question?', 'packers-and-movers' ); ?></h2>
					<p><?php esc_html_e( 'Get genuine support from genuine people. Whether it\'s customization or compatibility, our seasoned developers deliver tailored solutions to your queries.', 'packers-and-movers' ) ?></p>
					<p><a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_SUPPORT_THEME_URL ); ?>" class="button button-primary"><?php esc_html_e( 'Support Forum', 'packers-and-movers' ); ?></a></p>
				</div>
			</div>
			<div class="theme-price col card">
				<div class="price-flex">
					<div class="price-content">
						<h3><?php esc_html_e( 'Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></h3>
						<p class="main-flash"><?php 
						  printf(
						    /* translators: 1: bold FLASH DEAL text, 2: discount code */
						    esc_html__( '%1$s - Get 20%% Discount on All Themes, Use code %2$s', 'packers-and-movers' ),
						    '<strong class="bold-text">' . esc_html__( 'FLASH DEAL', 'packers-and-movers' ) . '</strong>',
						    '<strong class="bold-text">' . esc_html__( 'QBSALE20', 'packers-and-movers' ) . '</strong>'
						  ); 
						  ?></p>
						 <p>
						  <del><?php echo esc_html__( '$59', 'packers-and-movers' ); ?></del>
						  <strong class="bold-price"><?php echo esc_html__( '$39', 'packers-and-movers' ); ?></strong>
						</p>
					</div>
					<div class="price-img">
						<img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/theme-img.png" alt="theme-img" />
					</div>
				</div>
				<div class="main-pro-price">
					<a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_PRO_THEME_URL ); ?>" class="pro-btn-theme price-pro" target="_blank"><?php esc_html_e( 'Upgrade To Premium Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></a>
				</div>
			</div>
		</div>
	</div>
	<?php
}

/**
 * Output the changelog screen.
 */
function packers_and_movers_changelog_screen() {
		global $wp_filesystem;
	?>
	<div id="tp_changelog" class="packers-and-movers-tabcontent">
	<div class="content-row">
		<div class="wrap about-wrap change-log">
			<?php
				$changelog_file = apply_filters( 'packers_and_movers_changelog_file', PACKERS_AND_MOVERS_CHANGELOG_THEME_URL );
				// Check if the changelog file exists and is readable.
				if ( $changelog_file && is_readable( $changelog_file ) ) {
					WP_Filesystem();
					$changelog = $wp_filesystem->get_contents( $changelog_file );
					$changelog_list = packers_and_movers_parse_changelog( $changelog );

					echo wp_kses_post( $changelog_list );
				}
			?>
		</div>
		<div class="theme-price col card">
				<div class="price-flex">
					<div class="price-content">
						<h3><?php esc_html_e( 'Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></h3>
						<p class="main-flash"><?php 
						  printf(
						    /* translators: 1: bold FLASH DEAL text, 2: discount code */
						    esc_html__( '%1$s - Get 20%% Discount on All Themes, Use code %2$s', 'packers-and-movers' ),
						    '<strong class="bold-text">' . esc_html__( 'FLASH DEAL', 'packers-and-movers' ) . '</strong>',
						    '<strong class="bold-text">' . esc_html__( 'QBSALE20', 'packers-and-movers' ) . '</strong>'
						  ); 
						  ?></p>
						 <p>
						  <del><?php echo esc_html__( '$59', 'packers-and-movers' ); ?></del>
						  <strong class="bold-price"><?php echo esc_html__( '$39', 'packers-and-movers' ); ?></strong>
						</p>
					</div>
					<div class="price-img">
						<img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/theme-img.png" alt="theme-img" />
					</div>
				</div>
				<div class="main-pro-price">
					<a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_PRO_THEME_URL ); ?>" class="pro-btn-theme price-pro" target="_blank"><?php esc_html_e( 'Upgrade To Premium Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></a>
				</div>
			</div>
	</div>
</div>
	<?php
}

/**
 * Parse changelog from readme file.
 * @param  string $content
 * @return string
 */
function packers_and_movers_parse_changelog( $content ) {
	// Explode content with ==  to juse separate main content to array of headings.
	$content = explode ( '== ', $content );

	$changelog_isolated = '';

	// Get element with 'Changelog ==' as starting string, i.e isolate changelog.
	foreach ( $content as $key => $value ) {
		if (strpos( $value, 'Changelog ==') === 0) {
	    	$changelog_isolated = str_replace( 'Changelog ==', '', $value );
	    }
	}

	// Now Explode $changelog_isolated to manupulate it to add html elements.
	$changelog_array = explode( '= ', $changelog_isolated );

	// Unset first element as it is empty.
	unset( $changelog_array[0] );

	$changelog = '<pre class="changelog">';

	foreach ( $changelog_array as $value) {
		// Replace all enter (\n) elements with </span><span> , opening and closing span will be added in next process.
		$value = preg_replace( '/\n+/', '</span><span>', $value );

		// Add openinf and closing div and span, only first span element will have heading class.
		$value = '<div class="block"><span class="heading">= ' . $value . '</span></div>';

		// Remove empty <span></span> element which newr formed at the end.
		$changelog .= str_replace( '<span></span>', '', $value );
	}

	$changelog .= '</pre>';

	return wp_kses_post( $changelog );
}

/**
 * Import Demo data for theme using catch themes demo import plugin
 */
function packers_and_movers_free_vs_pro() {
	?>
	<div id="tp_free_vs_pro" class="packers-and-movers-tabcontent">
	<div class="content-row">
		<div class="wrap about-wrap change-log">
			<p class="about-description"><?php esc_html_e( 'View Free vs Pro Table below:', 'packers-and-movers' ); ?></p>
			<div class="vs-theme-table">
				<table>
					<thead>
						<tr><th scope="col"></th>
							<th class="head" scope="col"><?php esc_html_e( 'Free Theme', 'packers-and-movers' ); ?></th>
							<th class="head" scope="col"><?php esc_html_e( 'Pro Theme', 'packers-and-movers' ); ?></th>
						</tr>
					</thead>
					<tbody>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><span><?php esc_html_e( 'Theme Demo Set Up', 'packers-and-movers' ); ?></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Additional Templates, Color options and Fonts', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-saved"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Included Demo Content', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-saved"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Section Ordering', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-no-alt"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Multiple Sections', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-no-alt"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Additional Plugins', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-saved"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Premium Technical Support', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-no-alt"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Access to Support Forums', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-no-alt"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Free updates', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-saved"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Unlimited Domains', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-saved"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Responsive Design', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-saved"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td headers="features" class="feature"><?php esc_html_e( 'Live Customizer', 'packers-and-movers' ); ?></td>
							<td><span class="dashicons dashicons-saved"></span></td>
							<td><span class="dashicons dashicons-saved"></span></td>
						</tr>
						<tr class="odd" scope="row">
							<td class="feature feature--empty"></td>
							<td class="feature feature--empty"></td>
							<td headers="comp-2" class="td-btn-2"><a class="sidebar-button single-btn" href="<?php echo esc_url(PACKERS_AND_MOVERS_PRO_THEME_URL);?>" target="_blank"><?php esc_html_e( 'Go For Premium', 'packers-and-movers' ); ?></a></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div class="theme-price col card">
			<div class="price-flex">
				<div class="price-content">
					<h3><?php esc_html_e( 'Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></h3>
					<p class="main-flash"><?php 
					  printf(
					    /* translators: 1: bold FLASH DEAL text, 2: discount code */
					    esc_html__( '%1$s - Get 20%% Discount on All Themes, Use code %2$s', 'packers-and-movers' ),
					    '<strong class="bold-text">' . esc_html__( 'FLASH DEAL', 'packers-and-movers' ) . '</strong>',
					    '<strong class="bold-text">' . esc_html__( 'QBSALE20', 'packers-and-movers' ) . '</strong>'
					  ); 
					  ?></p>
					 <p>
					  <del><?php echo esc_html__( '$59', 'packers-and-movers' ); ?></del>
					  <strong class="bold-price"><?php echo esc_html__( '$39', 'packers-and-movers' ); ?></strong>
					</p>
				</div>
				<div class="price-img">
					<img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/theme-img.png" alt="theme-img" />
				</div>
			</div>
			<div class="main-pro-price">
				<a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_PRO_THEME_URL ); ?>" class="pro-btn-theme price-pro" target="_blank"><?php esc_html_e( 'Upgrade To Premium Packers And Movers WordPress Theme', 'packers-and-movers' ); ?></a>
			</div>
		</div>
	</div>
</div>
	<?php
}

function packers_and_movers_get_bundle() {
	?>
	<div id="tp_get_bundle" class="packers-and-movers-tabcontent">
		<div class="wrap about-wrap theme-main-bundle">
			<img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/theme-bundle.png" alt="theme-bundle" width="300" height="300" />
			<p class="bundle-link"><a target="_blank" href="<?php echo esc_url( PACKERS_AND_MOVERS_THEME_BUNDLE ); ?>" class="button button-primary bundle-btn"><?php esc_html_e( 'Buy WordPress Theme Bundle (140+ Themes)', 'packers-and-movers' ); ?></a></p>
		</div>
	</div>
	<?php
}