<?php
/**
 * Theme: luxuryconceptfree
 *
 * Theme Functions, includes, etc.
 *
 * @package luxuryconceptfree
 *
 */

/* ------------------------------------------------------------------------- *
 *  Base functionality
/* ------------------------------------------------------------------------- */

// Content width
if ( ! isset( $content_width ) ) {
	$content_width = 720;
}


/*  Theme setup
/* ------------------------------------ */
if ( ! function_exists( 'luxuryconceptfree_setup' ) ) {

	function luxuryconceptfree_setup() {

		$luxuryconceptfree_bg_color_defaults = array(
			'default-color' => '#FFFFFF',
		);
		add_theme_support( 'custom-background', $luxuryconceptfree_bg_color_defaults );

		// add title
		add_theme_support( "title-tag" );

		// logo
		$luxuryconceptfree_logo_defaults = array(
			'height' => 110,
			'width' => 265,
			'flex-height' => true,
			'flex-width' => true,
			'header-text' => array( 'site-title', 'site-description' ),
			'unlink-homepage-logo' => true,
		);
		add_theme_support( 'custom-logo', $luxuryconceptfree_logo_defaults );

		//custom header
		$luxuryconceptfree_header_defaults = array(
			'default-image' => '',
			'width' => 1920,
			'height' => 135,
			'flex-height' => false,
			'flex-width' => false,
			'random-default' => false,
			'header-text' => true,
			'default-text-color' => '#000000',
			'wp-head-callback' => '',
			'admin-head-callback' => '',
			'admin-preview-callback' => '',
		);
		add_theme_support( 'custom-header', $luxuryconceptfree_header_defaults );

		// Enable automatic feed links
		add_theme_support( 'automatic-feed-links' );

		// Add support for editor styles.
		add_theme_support( 'editor-styles' );

		// responsive embeds css classes
		add_theme_support( "responsive-embeds" );

		// html5
		add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'style', 'script' ) );

		// add default Gutenberg block styles 
		add_theme_support( 'wp-block-styles' );

		// add block templates with site editor support			
		add_theme_support( 'block-templates' );

		// Enable featured image
		add_theme_support( 'post-thumbnails' );
		add_theme_support( 'align-wide' );

		// Thumbnail sizes
		add_image_size( 'luxuryconceptfree_list', 300, 185, true ); //(cropped)
		add_image_size( 'luxuryconceptfree_single', 675, 450, true ); //(cropped)
		add_image_size( 'luxuryconceptfree_big', 1400, 928, true ); 	//(cropped)

		// Post Formats
		//add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );


		// Custom menu areas
		register_nav_menus( array(
			'headermenu' => esc_html__( 'Header Menu', 'luxuryconceptfree' ),
			'quickmenu' => esc_html__( 'Quick Menu', 'luxuryconceptfree' )
		) );

		// Load theme languages
		load_theme_textdomain( 'luxuryconceptfree', get_template_directory() . '/languages' );

		// Adds support for editor color palette.
		add_theme_support( 'editor-color-palette', array(
			array(
				'name' => __( 'Light gray', 'luxuryconceptfree' ),
				'slug' => 'light-gray',
				'color' => '#f5f5f5',
			),
			array(
				'name' => __( 'Medium gray', 'luxuryconceptfree' ),
				'slug' => 'medium-gray',
				'color' => '#999',
			),
			array(
				'name' => __( 'Dark gray', 'luxuryconceptfree' ),
				'slug' => 'dark-gray',
				'color' => '#333',
			),
			array(
				'name' => __( 'Link Color', 'luxuryconceptfree' ),
				'slug' => 'link-color',
				'color' => esc_attr( get_theme_mod( 'luxuryconceptfree_link_color', '#048ea0' ) ),
			),
			array(
				'name' => __( 'Link Color Hover', 'luxuryconceptfree' ),
				'slug' => 'link-color-hover',
				'color' => esc_attr( get_theme_mod( 'luxuryconceptfree_link_color_hover', '#105862' ) ),
			),
		) );

		// block style
		register_block_style(
			'core/quote',
			array(
				'name' => 'blue-quote',
				'label' => __( 'Blue Quote', 'luxuryconceptfree' ),
				'is_default' => true,
				'inline_style' => '.wp-block-quote.is-style-blue-quote { color: blue; }',
			)
		);



		/** --- WOOCOMMERCE CONFIG --- **/
		if ( luxuryconceptfree_is_woocommerce_activated() ) {

			// Add support to WooCommerce
			add_theme_support( 'woocommerce' );

			// Add effect on product
			//add_theme_support( 'wc-product-gallery-zoom' );
			//add_theme_support( 'wc-product-gallery-lightbox' );
			//add_theme_support( 'wc-product-gallery-slider' );

			//add_theme_support( 'woocommerce/product-image' );

			// Disable the default styling for WooCommerce
			/*if (class_exists('Woocommerce')){
													add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );
												}*/

		}
		/** --- END WOOCOMMERCE CONFIG --- **/


		// Add block patterns
		require get_template_directory() . '/inc/block-patterns.php';


		// Show Home Page preview on WP Repository Themes		 
		require get_template_directory() . '/inc/starter-content/starter-content.php';



	}

}
add_action( 'after_setup_theme', 'luxuryconceptfree_setup' );



add_action( 'init', 'luxuryconcept_set_wc' );

if ( ! function_exists( 'luxuryconcept_set_wc' ) ) {
	/**
	 * LuxuryConcept Init WooCommerce
	 *
	 * @since  1.0.0
	 */
	function luxuryconcept_set_wc() {
		// Remove the Woocommerce breadcrumbs (it's manually managed on luxuryconcept theme)
		remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); //
		// Remove before wrapper content for custom template
		remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
		// Remove after wrapper content for custom template
		remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );

		// ADD custom wrapper
		add_action( 'woocommerce_before_main_content', 'luxuryconcept_wc_output_content_wrapper', 20, 0 );
		add_action( 'woocommerce_after_main_content', 'luxuryconcept_wc_output_content_wrapper_end', 20, 0 );
	}

	/**
	 * Open wrappers.
	 */
	function luxuryconcept_wc_output_content_wrapper() {
		echo '<main id="content" class="main-content" role="main">';
	}

	/**
	 * Close wrappers.
	 */
	function luxuryconcept_wc_output_content_wrapper_end() {
		echo '</main>';
	}
}

/**
 * Provides a default menu featuring the 'Home' link, if not other menu has been provided.
 *
 */
function luxuryconceptfree_header_default_menu() {

	$html = '<ul id="header-default-menu" class="menu">';
	$html .= '<li class="menu-item menu-item-type-post_type menu-item-object-page">';
	$html .= '<a href="' . esc_url( home_url() ) . '" title="' . esc_attr__( 'Home', 'luxuryconceptfree' ) . '">';
	$html .= __( 'Home', 'luxuryconceptfree' );
	$html .= '</a>';
	$html .= '</li>';
	$html .= '</ul>';

	$allowed_html = array(
		'a' => array(
			'href' => array(),
			'title' => array()
		),
		'ul' => array(
			'id' => array(),
			'class' => array()
		),
		'li' => array(
			'id' => array(),
			'class' => array()
		),
	);

	echo wp_kses( $html, $allowed_html );

} // end header_default_menu



/*  Enqueue javascript
/* ------------------------------------ */
if ( ! function_exists( 'luxuryconceptfree_scripts' ) ) {

	function luxuryconceptfree_scripts() {

		// all script
		wp_enqueue_script( 'luxuryconceptfree-script', get_template_directory_uri() . '/js/script.js', array(), wp_get_theme()->get( 'Version' ), array( 'strategy' => 'defer', ) );

		//PACE.js ProgressBar script
		wp_enqueue_script( 'luxuryconceptfree-paceprogressbar', get_template_directory_uri() . '/inc/progressbar/pace/pace.min.js', array(), '1.2.4' );

		if ( is_singular() && get_option( 'thread_comments' ) ) {
			wp_enqueue_script( 'comment-reply' );
		}
	}

}
add_action( 'wp_enqueue_scripts', 'luxuryconceptfree_scripts' );


/*  Enqueue css
/* ------------------------------------ */
if ( ! function_exists( 'luxuryconceptfree_styles' ) ) {

	function luxuryconceptfree_styles() {
		wp_enqueue_style( 'luxuryconceptfree-google-font', 'https://fonts.googleapis.com/css?family=' . esc_attr( get_theme_mod( "luxuryconceptfree_google_font", "Quicksand" ) ) . ':' . esc_attr( get_theme_mod( "luxuryconceptfree_google_font_weight", "300,400,700" ) ) . esc_html( '&display=swap' ), array(), wp_get_theme()->get( 'Version' ), 'screen' );
		wp_enqueue_style( 'luxuryconceptfree-main', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ), 'screen' );

		// Pace.js progressbar styles
		wp_enqueue_style( 'luxuryconceptfree-paceprogressbar', get_template_directory_uri() . '/inc/progressbar/pace/themes/pace-theme-flash.min.css', array(), '1.2.4', 'screen' );
	}

}
add_action( 'wp_enqueue_scripts', 'luxuryconceptfree_styles' );

/*  Enqueue backend css
/* ------------------------------------ */
if ( ! function_exists( 'luxuryconceptfree_admin_google_font' ) ) {

	function luxuryconceptfree_admin_google_font() {
		wp_register_style( 'luxuryconceptfree-admin-google-font', 'https://fonts.googleapis.com/css?family=' . esc_attr( get_theme_mod( "luxuryconceptfree_google_font", "Quicksand" ) ) . ':' . esc_attr( get_theme_mod( "luxuryconceptfree_google_font_weight", "300,400,700" ) ) );
		wp_enqueue_style( 'luxuryconceptfree-admin-google-font' );
		wp_enqueue_style( 'luxuryconceptfree-admin-style', get_stylesheet_directory_uri() . '/css/admin-style.css' );
	}
}
add_action( 'admin_enqueue_scripts', 'luxuryconceptfree_admin_google_font' );


function luxuryconceptfree_resource_hints( $urls, $relation_type ) {
	if ( wp_style_is( 'luxuryconceptfree-google-font', 'queue' ) && 'preconnect' === $relation_type ) {
		$urls[] = array(
			'href' => '//fonts.gstatic.com',
			'crossorigin',
		);
		$urls[] = array(
			'href' => '//fonts.googleapis.com',
			'crossorigin',
		);
	}

	return $urls;
}
add_filter( 'wp_resource_hints', 'luxuryconceptfree_resource_hints', 10, 2 );





function luxuryconceptfree_custom_notification_customizer() {
	$handle = 'luxuryconceptfree-custom-notification';

	// Register the script.
	//wp_register_script( $handle, plugins_url( "$handle.js", __FILE__ ), array( 'customize-controls' ) );

	wp_register_script( $handle, get_template_directory_uri() . '/js/luxuryconceptfree-custom-notification.js', array( 'jquery', 'customize-controls' ), false, true );


	// Translate the message.
	$translated_msg = array(
		'msg' => esc_html( '<b style="font-size:14px">GET PREMIUM for more functionalities. <br> Go to <a target="_blank" href="https://luxuryconcept.website">Luxury Concept Theme</a></b>' ),
	);

	// Localize script with translated data.
	wp_localize_script( $handle, 'luxuryconceptfree', $translated_msg );
	// Enqueue the script.
	wp_enqueue_script( $handle );
}

add_action( 'customize_controls_enqueue_scripts', 'luxuryconceptfree_custom_notification_customizer' );




/*  Register sidebars
/* ------------------------------------ */
if ( ! function_exists( 'luxuryconceptfree_sidebars' ) ) {

	function luxuryconceptfree_sidebars() {

		register_sidebar( array( 'name' => esc_html__( 'Primary', 'luxuryconceptfree' ), 'id' => 'primary', 'description' => esc_html__( 'Left or Right Sidebar near content.', 'luxuryconceptfree' ), 'before_widget' => '<div id="%1$s" class="mb-3">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>' ) );

		register_sidebar( array( 'name' => esc_html__( 'Footer', 'luxuryconceptfree' ), 'id' => 'footer', 'description' => esc_html__( 'Footer full width sidebar.', 'luxuryconceptfree' ), 'before_widget' => '<div id="%1$s" class="mb-2 mt-2 flex-1">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>' ) );


	}

}
add_action( 'widgets_init', 'luxuryconceptfree_sidebars' );





/*  Register editor stylesheet for the theme.
/* ------------------------------------ */
function luxuryconceptfree_add_editor_styles() {
	add_editor_style( 'custom-editor-style.css' );
}
add_action( 'admin_init', 'luxuryconceptfree_add_editor_styles' );


/* Include Customizer Settings  */
get_template_part( 'inc/customizer/customizer' );


/* Customizer CSS Front-end */
/* ------------------------------------ */
function luxuryconceptfree_customize_css() {

	$luxuryconceptfree_bg_color = get_background_color();
	$luxuryconceptfree_header_text_color = get_header_textcolor();
	echo '<style>';
	echo ':root {';
	echo '--site-bg: ' . esc_attr( $luxuryconceptfree_bg_color ) . ';';
	echo '--link-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_link_color', '#45cfbe' ) ) . ';';
	echo '--link-color-hover: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_link_color_hover', '#3eb2bc' ) ) . ';';
	echo '--header-bg: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_header_bg_color', '#FFFFFF' ) ) . ';';
	echo '--topbar-bg: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_topbar_background_color', '#45cfbe' ) ) . ';';
	echo '--topbar-text-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_topbar_text_color', '#FFFFFF' ) ) . ';';

	echo '--borders-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_border_color', '#eaeaea' ) ) . ';';
	echo '--site-text-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_site_text_color', '#000000' ) ) . ';';
	//echo '--header-text-color: '. esc_attr($luxuryconceptfree_header_text_color) .';';
	echo '--header-transparent-text-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_header_transparent_text_color', '#FFFFFF' ) ) . ';';
	echo '--posts-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_posts_background_color', '#f9f9f9' ) ) . ';';
	echo '--site-font-size: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_site_font_size', '16px' ) ) . ';';
	echo '--body-font-family: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_google_font', 'Inter' ) ) . ';';
	echo ( esc_attr( get_theme_mod( 'luxuryconceptfree_sticky_header', 1 ) ) == 1 ) ? '--sticky-header: sticky;' : '--sticky-header: static;';
	echo '--number-col-masonry: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_number_col_blog', '3' ) ) . ';';
	echo '--h1-font-size: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_title1_font_size', '2.4rem' ) ) . ';';
	echo '--h2-font-size: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_title2_font_size', '1.5rem' ) ) . ';';
	echo '--h3-font-size: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_title3_font_size', '1.0rem' ) ) . ';';
	echo '--h4-font-size: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_title4_font_size', '0.8rem' ) ) . ';';

	echo ( esc_attr( get_theme_mod( 'luxuryconceptfree_logo_invert_color', '' ) ) == 1 ) ? '--logo-invert-color: invert(1);' : '--logo-invert-color: none;';


	echo ( esc_attr( get_theme_mod( 'luxuryconceptfree_header_footer_borders', '1' ) ) == 1 ) ? '--show-footer-header-borders: 1px solid var(--borders-color);' : '--show-footer-header-borders: none;';

	// Set Max Width Grid Wrapper Layout if Layout is Full Width
	echo '--wrapper-max-width: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_wrapper_max_width', '1300px' ) ) . ';';


	// Set Content Paddind if Layout is Full Width
	echo '--content-padding: 20px ' . esc_attr( get_theme_mod( 'luxuryconceptfree_content_padding', '2%' ) ) . ';';


	echo '}'; // Close root CSS	


	/* WP Block Button Color */
	echo '.wp-block-button__link{background-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_link_color', '#048ea0' ) ) . '}';
	echo '.wp-block-button__link:hover{background-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_link_color_hover', '#105862' ) ) . '}';


	if ( esc_attr( get_theme_mod( 'luxuryconceptfree_center_logo_menu_left', 'no' ) ) == "yes" ) {
		echo '@media (min-width: 991px) { .header__logo{position:absolute;left:46vw;order:2;} .menu{order:1; max-width: 40%;} }';
	}


	if ( get_header_image() ) : ?>
		.header{background-image:url('<?php header_image(); ?>');}
	<?php endif;

	echo '</style>';

	if ( esc_attr( get_theme_mod( 'luxuryconceptfree_layout_type' ) ) == 'boxed' ) {
		wp_enqueue_style( 'luxuryconceptfree-boxed-layout', get_stylesheet_directory_uri() . '/css/boxed-layout.css', array(), '', 'all' );
	}

}
add_action( 'wp_head', 'luxuryconceptfree_customize_css' );

/* Customizer CSS back-end */
/* ------------------------------------ */
function luxuryconceptfree_customize_css_backend() {

	$luxuryconceptfree_bg_color = get_background_color();
	echo '<style type="text/css">';
	echo '.block-editor__container .editor-styles-wrapper .wp-block-post-title,
				.block-editor__container .editor-styles-wrapper .wp-block-heading,
				.block-editor__container .editor-styles-wrapper .wp-block { font-family: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_google_font', 'Quicksand' ) ) . ';}';
	echo '.block-editor__container .editor-styles-wrapper{background: #' . esc_attr( $luxuryconceptfree_bg_color ) . '}';
	echo '.block-editor__container .editor-styles-wrapper .wp-block-button__link{background-color: ' . esc_attr( get_theme_mod( 'luxuryconceptfree_link_color', '#048ea0' ) ) . '}';
	echo '</style>';

}
add_action( 'admin_head', 'luxuryconceptfree_customize_css_backend' );

/* Include Custom comments template  */
get_template_part( 'inc/comments/custom-comments' );

/* Include Comment author user role label function to show user role on comments */
get_template_part( 'inc/comments/comment-author-user-role-label' );



/**
 * Check if WooCommerce is activated
 */
if ( ! function_exists( 'luxuryconceptfree_is_woocommerce_activated' ) ) {
	function luxuryconceptfree_is_woocommerce_activated() {
		if ( class_exists( 'woocommerce' ) ) {
			return true;
		} else {
			return false;
		}
	}
}


if ( ! function_exists( 'luxuryconceptfree_custom_breadcrumb' ) ) {

	function luxuryconceptfree_custom_breadcrumbs() {
		get_template_part( 'inc/content/custom-breadcrumb' );
		luxuryconceptfree_breadcrumb( '', '' );
	}
}

function luxuryconceptfree_get_breadcrumbs() {

	if ( esc_attr( get_theme_mod( 'luxuryconceptfree_breadcrumbs', 'no' ) ) == 'custom' ) {
		/* Show CUSTOM Breadcrumb */
		if ( function_exists( 'luxuryconceptfree_custom_breadcrumbs' ) )
			luxuryconceptfree_custom_breadcrumbs();

	} elseif ( esc_attr( get_theme_mod( 'luxuryconceptfree_breadcrumbs', 'no' ) ) == 'yoast' ) {
		/* Show YOAST Breadcrumb */
		if ( function_exists( 'yoast_breadcrumb' ) )
			yoast_breadcrumb( '<nav class="breadcrumbs" itemprop="breadcrumb">', '</nav>' );
	}
}
add_action( 'luxuryconceptfree_show_breadcrumb', 'luxuryconceptfree_get_breadcrumbs' );




function luxuryconceptfree_buy_premium_theme_notice() {
	/* Show Notice in Admin Dashboard 
	 * 	WPTRT Admin Notices
	 *   GiiHub URL: https://github.com/WPTT/admin-notices
	 */
	get_template_part( 'inc/admin-notices-master/src/notices' );
	get_template_part( 'inc/admin-notices-master/src/notice' );
	get_template_part( 'inc/admin-notices-master/src/dismiss' );

	$my_theme_notices = new \WPTRT\AdminNotices\Notices();

	ob_start(); ?>
	<p><?php esc_html_e( 'Luxury Concept Free Theme was successfully installed!', 'luxuryconceptfree' ); ?></p>
	<p><?php esc_html_e( 'Would you like more features? Buy PREMIUM THEME on ', 'luxuryconceptfree' ); ?> <a
			href="<?php echo esc_url( 'https://luxuryconcept.website', 'luxuryconceptfree' ); ?>"
			target="_blank"><?php esc_html_e( 'Luxury Concept Theme', 'luxuryconceptfree' ); ?></a><?php esc_html_e( ' - Today on sale at a DISCOUNTED PRICE! ', 'luxuryconceptfree' ); ?>
	</p>
	<p><?php esc_html_e( 'For more informations ', 'luxuryconceptfree' ); ?> <a
			href="<?php echo esc_url( get_admin_url() . 'themes.php?page=luxuryconceptfree_dashboard' ); ?>">
			<?php esc_html_e( 'Click Here!', 'luxuryconceptfree' ); ?></a></p>
	<?php $luxuryconceptfree_notice_content = ob_get_clean();

	$my_theme_notices->add(
		'luxuryconceptfree',                                  // Unique ID.
		esc_html__( 'Howdy!', 'luxuryconceptfree' ),   // The title for this notice.
		$luxuryconceptfree_notice_content, // The content for this notice.
		[ 
			'scope' => 'user',       // Dismiss is per-user instead of global.
			//'screens'       => [ 'themes' ], // Only show notice in the "themes" screen.
			'type' => 'info',    // Make this a warning (orange color).
			'alt_style' => false,         // Use alt styles.
			'option_prefix' => 'luxuryconceptfree',   // Change the user-meta prefix.
		]
	);


	// Boot things up.
	$my_theme_notices->boot();
}
add_action( 'luxuryconceptfree_show_admin_notice', 'luxuryconceptfree_buy_premium_theme_notice' );
do_action( 'luxuryconceptfree_show_admin_notice' );



/**
 * Register a custom menu page.
 */
function luxuryconceptfree_add_admin_custom_menu() {
	add_theme_page(
		esc_html__( 'Luxury Concept', 'luxuryconceptfree' ),
		esc_html__( 'Luxury Concept', 'luxuryconceptfree' ),
		'edit_theme_options',
		'luxuryconceptfree_dashboard',
		'luxuryconceptfree_render_admin_menu',
		0
	);
}
add_action( 'admin_menu', 'luxuryconceptfree_add_admin_custom_menu' );

function luxuryconceptfree_render_admin_menu() {

	?>
	<div class="wrap">
		<div class="luxuryconcept_admin_dashboard">
			<h1><?php esc_html_e( 'Howdy!', 'luxuryconceptfree' ); ?></h1>
			<p><?php esc_html_e( 'Would you like more features? Buy PREMIUM THEME on ', 'luxuryconceptfree' ); ?> <a
					href="<?php echo esc_url( 'https://luxuryconcept.website', 'luxuryconceptfree' ); ?>"
					target="_blank"><?php esc_html_e( 'Luxury Concept Theme', 'luxuryconceptfree' ); ?></a><?php esc_html_e( ' - Today on sale at a DISCOUNTED PRICE! ', 'luxuryconceptfree' ); ?>
			</p>

			<div class="luxuryconcept-flex-container">
				<div class="luxuryconcept-col-1">

					<img src="<?php echo esc_url( 'https://luxuryconcept.website/wp-content/uploads/luxuryconceptthemescreenshot.png' ); ?>"
						title="<?php echo esc_attr__( 'Luxury Concept Theme', 'luxuryconceptfree' ); ?>">

				</div>
				<div class="luxuryconcept-col-2">
					<div class="luxuryconcept-grid-table">
						<div class="cell-grid-heading">FREE</div>
						<div class="cell-grid-heading">PRO</div>
						<div class="cell-grid icon-checked">Base Engine</div>
						<div class="cell-grid icon-checked">Base Engine</div>
						<div class="cell-grid icon-checked">Posts and Pages template</div>
						<div class="cell-grid icon-checked">Posts and Pages template</div>
						<div class="cell-grid icon-checked">Google Fonts</div>
						<div class="cell-grid icon-checked">Google Fonts</div>
						<div class="cell-grid icon-x">2 menus</div>
						<div class="cell-grid icon-checked">4 menus</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">Customizable Mobile Menu</div>
						<div class="cell-grid icon-x">Only Full Width Layout</div>
						<div class="cell-grid icon-checked">Full width and Boxed Layout</div>
						<div class="cell-grid icon-x">Basic WP Customizer Settings</div>
						<div class="cell-grid icon-checked">WP Customizer Settings (more customisations)</div>
						<div class="cell-grid icon-x">Only 2 typography font size</div>
						<div class="cell-grid icon-checked">More typography font size (global,h1,h2,h3,h4)</div>
						<div class="cell-grid icon-checked">Custom logo</div>
						<div class="cell-grid icon-checked">Custom logo</div>
						<div class="cell-grid icon-x">Only Left logo and menu centered</div>
						<div class="cell-grid icon-checked">Logo Left / Menu center OR Menu left / Logo center</div>
						<div class="cell-grid icon-x">Only support YOAST Beadcrumb</div>
						<div class="cell-grid icon-checked">Yoast, Rank Math, Custom and Woocommerce breadcrumbs</div>
						<div class="cell-grid icon-x">Featured article image (no / after title)</div>
						<div class="cell-grid icon-checked">Featured article image (no / before title / after title)</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">Custom Header</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">Colorbox on Gallery images</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">WooCommerce Support</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">WooCommerce Ajax Mini Cart Header</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">WooCommerce Custom Styles</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">Shop Sidebar</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">Whatsapp Icon</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">PORTFOLIO Custom Post Type</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">TOP BAR MESSAGGE / LINK</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">FOOTER STICKY BAR To Boost Conversion!</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">Custom footer copyright text</div>
						<div class="cell-grid icon-x">No</div>
						<div class="cell-grid icon-checked">Minified CSS and JS</div>
						<div class="cell-grid icon-x">Fast and Light</div>
						<div class="cell-grid icon-checked">SUPER Performace Super Fast and light</div>
					</div>
				</div>
				<div class="luxuryconcept-col-3">
					<h3> <span class="dashicons dashicons-images-alt2"></span>
						<?php esc_html_e( 'General Info', 'luxuryconceptfree' ); ?></h3>
					<p><?php esc_html_e( 'A lightweight, fast and responsive WordPress theme: outstanding performance, modern design, and intuitive customization. Optimized for mobile devices, it delivers a seamless user experience. Choose efficiency without compromises!', 'luxuryconceptfree' ); ?>
					</p>
					<a href="<?php echo esc_url( 'https://luxuryconcept.website/product/luxury-concept-wordpress-theme/' ); ?>"
						target="_blank" title="<?php echo esc_attr( 'Luxury Concept Pro Theme' ); ?>"><span
							class="dashicons dashicons-external luxuryconcept-url"></span>Buy Pro Theme</a>
				</div>
			</div>
		</div>
	</div>
	<?php

}



if ( ! function_exists( 'luxuryconceptfree_is_woocommerce_activated' ) ) {
	/**
	 * Check if WooCommerce is activated
	 *
	 * @since  1.3.0
	 */
	function luxuryconceptfree_is_woocommerce_activated() {
		return class_exists( 'WooCommerce' ) ? true : false;
	}

}


add_action( 'luxuryconceptfree_show_header_cart', 'luxuryconceptfree_mini_cart_header', 0 );

if ( ! function_exists( 'luxuryconceptfree_mini_cart_header' ) ) {
	/**
	 * LuxuryConcept Display Mini Cart Icon on Menu Header
	 *
	 * @since  1.3.0
	 */
	function luxuryconceptfree_mini_cart_header() {
		if ( luxuryconceptfree_is_woocommerce_activated() ) {
			if ( ! is_cart() and ! is_checkout() ) {
				global $woocommerce;
				$count = $woocommerce->cart->cart_contents_count;
				?>
				<ul class="header__mini_cart" tabindex="-1" data-toggle="dropdown" aria-hidden="true">
					<a href="<?php echo esc_url( wc_get_cart_url() ) ?>">
						<li class="li__icon_cart"><span class="badge-cart-items-count" value="<?php echo esc_html( $count ); ?>"><svg
									class="mini_cart_button icon-36" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"
									fill="currentColor" stroke="currentColor">
									<circle cx="176" cy="416" r="32" />
									<circle cx="400" cy="416" r="32" />
									<path
										d="M456.8 120.78a23.92 23.92 0 00-18.56-8.78H133.89l-6.13-34.78A16 16 0 00112 64H48a16 16 0 000 32h50.58l45.66 258.78A16 16 0 00160 368h256a16 16 0 000-32H173.42l-5.64-32h241.66A24.07 24.07 0 00433 284.71l28.8-144a24 24 0 00-5-19.93z" />
								</svg></span></li>
					</a>
				</ul>
			<?php }
		}
	}
}


add_filter( 'woocommerce_add_to_cart_fragments', 'luxuryconceptfree_refresh_mini_cart_content_fragments', 10, 1 );

if ( ! function_exists( 'luxuryconceptfree_refresh_mini_cart_content_fragments' ) ) {
	/**
	 * LuxuryConcept Ajax Refresh Mini Cart (Fragments)
	 *
	 * @since  1.3.0
	 */
	function luxuryconceptfree_refresh_mini_cart_content_fragments( $fragments ) {
		/* Refresh Counter Cart */
		global $woocommerce;
		$count = $woocommerce->cart->cart_contents_count;

		ob_start();
		?><span class="badge-cart-items-count" value="<?php echo esc_html( $count ); ?>"><svg
				class="mini_cart_button icon-36" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"
				stroke="currentColor">
				<circle cx="176" cy="416" r="32" />
				<circle cx="400" cy="416" r="32" />
				<path
					d="M456.8 120.78a23.92 23.92 0 00-18.56-8.78H133.89l-6.13-34.78A16 16 0 00112 64H48a16 16 0 000 32h50.58l45.66 258.78A16 16 0 00160 368h256a16 16 0 000-32H173.42l-5.64-32h241.66A24.07 24.07 0 00433 284.71l28.8-144a24 24 0 00-5-19.93z" />
			</svg></span>
		<?php
		$fragments['.badge-cart-items-count'] = ob_get_clean();

		return $fragments;
	}
}