403Webshell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.222
Web Server : Apache
System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User : karinebmkh ( 644538)
PHP Version : 8.4.22
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/karinebmkh/www2/wp-content/themes/glaza/templates/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/karinebmkh/www2/wp-content/themes/glaza/templates//shop.php
<?php
/**
 * shop the post
 */
if ( ! function_exists( 'glaza_post_shop' ) ) :
	function glaza_post_shop( $setting = array(), $query_data = null ) {

		$post_id = get_the_ID();
		$check   = get_post_meta( $post_id, 'glaza_meta_shop_enable', true );

		if ( empty( $check ) ) {
			return false;
		}

		$embed_code = get_post_meta( $post_id, 'glaza_meta_shop_embed', true );

		if ( ! empty( $embed_code ) ) : ?>
			<div class="shopthepost embed layout-default">
				<?php echo do_shortcode( $embed_code ); ?>
			</div>
			<?php return false;
		endif;

		if ( ! class_exists( 'Woocommerce' ) || empty( $setting['shopthepost'] ) ) {
			return false;
		}
		if ( empty( $setting['product_columns'] ) ) {
			$columns = 5;
		} else {
			$columns = intval( $setting['product_columns'] );
		}

		$products = glaza_shop_the_post_data( $post_id );
		if ( empty( $products ) || ! is_object( $products ) ) {
			return false;
		}

		if ( $products->have_posts() ) : ?>
			<div class="shopthepost woocommerce layout-default">
				<div class="shop-content-default products clearfix columns-<?php echo esc_attr( $columns ); ?>">
					<?php while ( $products->have_posts() ) :
						$products->the_post();
						global $product;
						wc_get_template_part( 'content', 'product' );
					endwhile; ?>
				</div>
			</div>
			<?php if ( method_exists( $query_data, 'reset_postdata' ) ) {
				$query_data->reset_postdata();
				wc_reset_loop();
			}
		endif;
	}
endif;


/**
 * post shop popup
 */
if ( ! function_exists( 'glaza_post_shop_popup' ) ) :
	function glaza_post_shop_popup( $setting = array(), $query_data = null ) {

		$post_id = get_the_ID();
		$check   = get_post_meta( $post_id, 'glaza_meta_shop_enable', true );
		if ( empty( $check ) ) {
			return false;
		}

		$embed_code = get_post_meta( $post_id, 'glaza_meta_shop_embed', true );
		if ( ! empty( $embed_code ) ) :
			glaza_post_shop_popup_embed( $embed_code );

			return false;
		endif;

		if ( ! class_exists( 'Woocommerce' ) || empty( $setting['shopthepost'] ) ) {
			return false;
		}

		if ( empty( $setting['product_columns'] ) ) {
			$columns = 5;
		} else {
			$columns = intval( $setting['product_columns'] );
		}

		$products = glaza_shop_the_post_data( $post_id );
		if ( empty( $products ) || ! is_object( $products ) ) {
			return false;
		}

		if ( $products->have_posts() ) : ?>
			<div class="shopthepost-popup">
				<a href="#" class="shop-post-toggle" data-effect="mpf-effect" data-mfp-src="#shop-post-popup-<?php echo esc_attr( $post_id ); ?>"><i class="icon-simple icon-handbag"></i></a>

				<div id="shop-post-popup-<?php echo esc_attr( $post_id ); ?>" class="shop-post-popup mfp-hide mfp-animation">
					<div class="shop-post-holder shopthepost woocommerce container">
						<div class="load-animation"></div>
						<div class="shop-content-popup pre-load products clearfix" data-carousel="<?php echo esc_attr( $columns ); ?>">
							<?php while ( $products->have_posts() ) :
								$products->the_post();
								global $product;
								wc_get_template_part( 'content', 'product' );
							endwhile; ?>
						</div>
					</div>
				</div>
			</div>
			<?php if ( method_exists( $query_data, 'reset_postdata' ) ) {
				$query_data->reset_postdata();
				wc_reset_loop();
			}
		endif;
	}
endif;


/**
 * @param $embed_code
 * shop popup with embed code
 */
if ( ! function_exists( 'glaza_post_shop_popup_embed' ) ):
	function glaza_post_shop_popup_embed( $embed_code ) {

		$post_id = get_the_ID();
		$check   = get_post_meta( $post_id, 'glaza_meta_shop_enable', true );
		if ( empty( $check ) ) {
			return false;
		} ?>
		<div class="shopthepost layout-popup embed">
			<a href="#" class="shop-post-toggle" data-effect="mpf-effect" data-mfp-src="#shop-post-popup-<?php echo esc_attr( $post_id ); ?>"><i class="icon-simple icon-handbag"></i></a>

			<div id="shop-post-popup-<?php echo esc_attr( $post_id ); ?>" class="shop-post-popup mfp-hide mfp-animation">
				<div class="shop-post-holder container">
					<?php echo do_shortcode( $embed_code ); ?>
				</div>
			</div>
		</div>
	<?php
	}
endif;


/**
 * shop the post in single post
 */
if ( ! function_exists( 'glaza_single_shop' ) ):
	function glaza_single_shop( $classes = '' ) {

		$post_id = get_the_ID();
		$check   = get_post_meta( $post_id, 'glaza_meta_shop_enable', true );
		if ( empty( $check ) ) {
			return false;
		}

		$embed_code = get_post_meta( $post_id, 'glaza_meta_shop_embed', true );

		if ( ! empty( $embed_code ) ) : ?>
			<div id="shopthepost" class="shopthepost shopthepost-single embed layout-default">
				<?php echo do_shortcode( $embed_code ); ?>
			</div>
			<?php return false;
		endif;

		if ( ! class_exists( 'Woocommerce' ) ) {
			return false;
		}

		$layout   = glaza_single_shop_layout();
		$style    = glaza_single_shop_style();
		$products = glaza_shop_the_post_data( $post_id );
		$title    = glaza_get_option( 'single_post_shop_title' );

		if ( empty( $products ) || ! is_object( $products ) ) {
			return false;
		}

		$class_name   = array();
		$class_name[] = 'single-shop';
		if ( ! empty( $classes ) ) {
			$class_name[] = esc_attr( $classes );
		}

		if ( ! empty( $style ) && 'dark' == $style ) {
			$class_name[] = 'is-light-text is-dark-style';
		} else {
			$class_name[] = 'is-light-style';
		}
		$class_name = implode( ' ', $class_name ); ?>
		<div class="<?php echo esc_attr( $class_name ); ?>">
			<?php if ( ! empty( $title ) ) {
				echo '<div class="single-shop-title"><h3 class="widget-title">' . esc_html( $title ) . '</h3></div>';
			}
			if ( ! empty( $layout ) && 'carousel' == $layout ) {
				glaza_single_shop_carousel( $products );
			} else {
				glaza_single_shop_grid( $products, $layout );
			} ?>
		</div>
	<?php
	}
endif;

/**
 * product carousel in single post
 */
if ( ! function_exists( 'glaza_single_shop_carousel' ) ):
	function glaza_single_shop_carousel( $products ) {

		if ( $products->have_posts() ) : ?>
			<div id="shopthepost" class="shopthepost shopthepost-single woocommerce layout-carousel">
				<div class="content-carousel product-pre-load clearfix" data-columns="4">
					<div class="load-animation"></div>
					<div class="products">
						<?php while ( $products->have_posts() ) :
							$products->the_post();
							global $product;
							wc_get_template_part( 'content', 'product' );
						endwhile; ?>
					</div>
				</div>
			</div>
			<?php
			wp_reset_postdata();
			wc_reset_loop();
		endif;
	}
endif;

/**
 * product gird in single post
 */
if ( ! function_exists( 'glaza_single_shop_grid' ) ):
	function glaza_single_shop_grid( $products, $columns = 4 ) {

		if ( $products->have_posts() ) : ?>
			<div id="shopthepost" class="shopthepost shopthepost-single woocommerce layout-default">
				<div class="shop-content-default products clearfix columns-<?php echo esc_attr( $columns ); ?>">
					<?php while ( $products->have_posts() ) :
						$products->the_post();
						global $product;
						wc_get_template_part( 'content', 'product' );
					endwhile; ?>
				</div>
			</div>
			<?php
			wp_reset_postdata();
			wc_reset_loop();
		endif;
	}
endif;

Youez - 2016 - github.com/yon3zu
LinuXploit