<?php

add_action( 'admin_menu', 'event_management_gettingstarted' );
function event_management_gettingstarted() {    	
	add_theme_page( esc_html__('About Theme', 'event-management'), esc_html__('Theme Demo Import', 'event-management'), 'edit_theme_options', 'event-management-guide-page', 'event_management_guide');   
}

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

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

// Notice after Theme Activation
function event_management_notice(){
    global $pagenow;
    if ( is_admin() && $pagenow === 'themes.php' && (!isset($_GET['page']) || $_GET['page'] !== 'event-management-guide-page')
) {
$event_management_meta = get_option( 'event_management_admin_notice' );
	if (!$event_management_meta) {?>
    <div id="event-management-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 Event Management, You Rock!', 'event-management' ) ?> </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.', 'event-management' ) ?></p>
				<div style="display: grid;">
					<a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=event-management-guide-page' )); ?>"><?php esc_html_e( 'Get Started', 'event-management' ) ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( EVENT_MANAGEMENT_BUY_BUNDLE ); ?>"><?php esc_html_e('Get Bundle', 'event-management') ?></a>
					<a class="button notice-btn" target="_blank" href="<?php echo esc_url( EVENT_MANAGEMENT_LIVE_DEMO ); ?>"><?php esc_html_e('Pro Demo', 'event-management') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( EVENT_MANAGEMENT_BUY_PRO ); ?>"><?php esc_html_e('Upgrade To Pro', 'event-management') ?></a>
					<a  class="button notice-btn" target="_blank" href="<?php echo esc_url( EVENT_MANAGEMENT_FREE_DOC ); ?>"><?php esc_html_e('Free Doc', 'event-management') ?></a>
				</div>
			</div>
		</div>
	</div>
	<?php }
}
}
add_action('admin_notices', 'event_management_notice');

// Admin notice code START
function event_management_dismissed_notice() {
	update_option( 'event_management_admin_notice', true );
}
add_action( 'wp_ajax_event_management_dismissed_notice', 'event_management_dismissed_notice' );

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

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

	// Theme info
	$event_management_return = add_query_arg( array()) ;
	$event_management_theme = wp_get_theme( 'event-management' ); ?>

	<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', 'event-management' ); ?></span>
						<h2 class="bwp-bundle-banner__title"><?php esc_html_e( '250+ Premium WordPress Themes in One Bundle', 'event-management' ); ?></h2>
						<p class="bwp-bundle-banner__desc">
							<strong><?php esc_html_e( 'SUMMER SALE!', 'event-management' ); ?></strong>
							<?php esc_html_e( 'Get 15% off on a Bundle of 250+ Premium WP Themes. Use', 'event-management' ); ?>
							<span class="bwp-bundle-banner__coupon-inline">&quot;SUMMER15&quot;</span>
							<?php esc_html_e( 'at Checkout.', 'event-management' ); ?>
						</p>
						<div class="bwp-bundle-banner__actions">
							<a class="bwp-bundle-banner__cta" target="_blank" href="<?php echo esc_url( EVENT_MANAGEMENT_BUY_BUNDLE ); ?>"><?php esc_html_e( 'Get Bundle Just at $99', 'event-management' ); ?><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', 'event-management' ); ?>">
								<span class="bwp-bundle-banner__coupon-label"><?php esc_html_e( 'Coupon Code', 'event-management' ); ?></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!', 'event-management' ); ?></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', 'event-management' ); ?></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="event_management_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'event-management' ); ?></button>
				<button role="tab" class="tablinks" onclick="event_management_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'event-management' ); ?></button>
				<button role="tab" class="tablinks" onclick="event_management_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'event-management' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( EVENT_MANAGEMENT_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'event-management' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( EVENT_MANAGEMENT_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'event-management' ); ?>
				</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 Event Management ', 'event-management' ); ?>
							<span><?php esc_html_e( 'Version: ', 'event-management' ); ?><?php echo esc_html($event_management_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.', 'event-management' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'event-management' ); ?></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...', 'event-management'); ?>" />
								</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', 'event-management'); ?>" />
							<div class="install-plugins__actions">
								<a class="install-plugins__btn install-plugins__btn--pro" href="<?php echo esc_url( EVENT_MANAGEMENT_BUY_PRO ); ?>" target="_blank"><?php esc_html_e( 'Get Pro at $39', 'event-management' ); ?></a>
								<a class="install-plugins__btn install-plugins__btn--bundle" href="<?php echo esc_url( EVENT_MANAGEMENT_BUY_BUNDLE ); ?>" target="_blank"><?php esc_html_e( 'Buy Bundle at $99', 'event-management' ); ?></a>
							</div>
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','event-management'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( EVENT_MANAGEMENT_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','event-management'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','event-management'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','event-management'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','event-management'); ?></a> <?php esc_html_e( 'your website.','event-management'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','event-management'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( EVENT_MANAGEMENT_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','event-management'); ?></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 Event Management Theme', 'event-management' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Event Management is a clean and sleek theme designed for event management agencies and companies. The beautiful layout is perfect for websites related to event planning, corporate event organizers, seminar hosts, business expos, meeting planners, workshops, networking events, award ceremonies, fundraising events, wedding planners, festivals, concerts, conferences, exhibitions, and virtual event management. Its equally suited for product launches, cultural festivals, sports events, corporate retreats, birthday parties, private functions, and professional event coordination. Built with a popular event calendar and booking plugin, it enables you to manage event schedules, ticket bookings, RSVPs, and attendee registrations with ease. The theme features secure, SEO-friendly, and optimized code to ensure fast load times and high search engine rankings. Its robust Bootstrap framework and responsive design guarantee a flexible and visually appealing layout across all devices. With extensive customization options, interactive sections like Testimonials and Team, integrated CTAs for better conversions, and social media sharing features, the Event Management theme offers a user-friendly, professional, and performance-driven solution for modern event planners and organizers. ', 'event-management' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','event-management'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','event-management'); ?></a> <?php esc_html_e( 'your website.','event-management'); ?> </l>
								<li><?php esc_html_e( 'Event Management','event-management'); ?> <a target="_blank" href="<?php echo esc_url( EVENT_MANAGEMENT_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','event-management'); ?></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.','event-management'); ?></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', 'event-management'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','event-management'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'If you are looking to carve a niche in the event management business, what could be better than creating a website. This Event Management WordPress Theme gives you a stunning design that is exclusively created for event planners, event management firms, etc. Wedding planners and other party organizers can also use this theme. Its design is very clean and sorted yet stylish and trendy giving a perfect look for showing parties and events online. The color scheme is absolutely gorgeous and goes very well with the concept. Event Management WordPress Theme comes with a nicely designed header followed by an amazing full-width slider to display the blazing images of your events and catch the attention of your audience. To add more professional touch to your website, you can upload your companys customized logo. There is no need to get worried about the initial setup process as well as making your website live since the demo data gives you a perfect design to kickstart your website with. A functionally beautiful homepage depicts all your details including your work, experience in the field, the number of clients you have worked for, your contact details as well as email ID.', 'event-management' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','event-management'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Car listing Shortcode with category','event-management'); ?></li>
									<li><?php esc_html_e( 'Car listing Shortcode','event-management'); ?></li>
									<li><?php esc_html_e( 'Multiple image feature for each property with slider.','event-management'); ?></li>
									<li><?php esc_html_e( 'Brand Listing Section','event-management'); ?></li>
									<li><?php esc_html_e( 'Car Brand(categories) Option','event-management'); ?></li>
									<li><?php esc_html_e( 'Car Tags(categories) Option','event-management'); ?></li>
									<li><?php esc_html_e( 'Testimonial listing.','event-management'); ?></li>
									<li><?php esc_html_e( 'Testimonial shortcode.','event-management'); ?></li>
									<li><?php esc_html_e( 'Social icons widget.','event-management'); ?></li>
									<li><?php esc_html_e( 'Latest post with the image widget.','event-management'); ?></li>
									<li><?php esc_html_e( 'Live customize editor for the About US section.','event-management'); ?></li>
									<li><?php esc_html_e( 'Font Awesome integrated.','event-management'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets.','event-management'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options.','event-management'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections.','event-management'); ?></li>
									<li><?php esc_html_e( 'Well sanitized as per WordPress standards.','event-management'); ?></li>
									<li><?php esc_html_e( 'Allow to set site title, tagline, logo.','event-management'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads.','event-management'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar.','event-management'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page.','event-management'); ?></li>
									<li><?php esc_html_e( 'Footer Widgets & Editor style','event-management'); ?></li>
									<li><?php esc_html_e( 'Gallery & Banner functionality','event-management'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','event-management'); ?></li>
									<li><?php esc_html_e( 'Full-width Template','event-management'); ?></li>
									<li><?php esc_html_e( 'Custom Menu, Colors Editor','event-management'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<?php }?>