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/single.php
<?php
if ( ! function_exists( 'glaza_single_post' ) ) :
	function glaza_single_post() {
		$layout = glaza_check_post_layout();
		while ( have_posts() ) {
			the_post();
			switch ( $layout ) {
				case '2':
					glaza_single_post_layout_2();
					break;
				case '3':
					glaza_single_post_layout_3();
					break;
				case '4':
					glaza_single_post_layout_4();
					break;
				case '5':
					glaza_single_post_layout_5();
					break;
				case '6':
					glaza_single_post_layout_6();
					break;
				default:
					glaza_single_post_layout_1();
					break;
			}
		}
	}
endif;


/**
 * @param string $class_name
 * render single title
 */
if ( ! function_exists( 'glaza_single_post_title' ) ) :
	function glaza_single_post_title( $classes = 'size-1' ) {
		$class_name = 'single-title post-title entry-title ' . esc_attr( $classes ); ?>
		<h1 class="<?php echo esc_attr( $class_name ); ?>"><?php the_title(); ?></h1>
	<?php
	}
endif;


/**
 * single post content
 */
if ( ! function_exists( 'glaza_single_post_entry' ) ) :
	function glaza_single_post_entry() {
		$shop_position   = glaza_single_shop_position();
		$review_check    = glaza_review_check();
		$review_position = glaza_review_position();

		glaza_single_section_top();
		if ( empty( $shop_position ) || 'top' == $shop_position ):
			glaza_single_shop( 'shop-top' );
		endif; ?>
		<div class="entry single-entry clearfix">
			<?php
			if ( ! empty( $review_check ) && 'top' == $review_position ):
				glaza_single_review( 'is-top' );
			endif;

			the_content(); ?>
			<div class="clearfix"></div>
			<?php if ( ! empty( $review_check ) && 'bottom' == $review_position ) :
				glaza_single_review( 'is-bottom' );
			endif;

			wp_link_pages( array(
				'before'      => '<div class="page-links pagination-wrap pagination-number">' . glaza_translate( 'pages' ),
				'link_before' => '<span class="page-numbers">',
				'link_after'  => '</span>',
				'type'        => 'plain',
				'after'       => '</div>',
			) );

			if ( function_exists( 'glaza_microdata_markup' ) ):
				glaza_microdata_markup();
			endif; ?>
		</div>
		<?php if ( 'bottom' == $shop_position ):
			glaza_single_shop( 'shop-bottom' );
		endif;
		glaza_single_post_like();
		glaza_single_post_share_bottom();
		glaza_single_section_bottom();
		glaza_single_post_share_left();
	}
endif;


/**
 * @return string
 * render single post title
 */
if ( ! function_exists( 'glaza_single_post_tagline' ) ) :
	function glaza_single_post_tagline() {

		$tagline = get_post_meta( get_the_ID(), 'glaza_meta_tagline', true );
		if ( empty( $tagline ) ) {
			return false;
		} ?>
		<div class="single-tagline post-title size-3"><h3><?php echo esc_html( $tagline ); ?></h3></div>
	<?php
	}
endif;


/**
 *
 * render single post meta tags info
 */
if ( ! function_exists( 'glaza_single_post_meta_info' ) ) :
	function glaza_single_post_meta_info() {

		$meta_info_manager = glaza_get_option( 'single_post_meta_info_manager' );
		if ( empty( $meta_info_manager['enabled'] ) || ! is_array( $meta_info_manager['enabled'] ) ) {
			return false;
		} ?>
		<div class="single-meta-info post-meta-info">
			<?php
			foreach ( $meta_info_manager['enabled'] as $key => $val ) {
				switch ( $key ) {
					case 'date' :
						glaza_post_meta_date();
						break;
					case 'author' :
						glaza_post_meta_author();
						break;
					case 'cat' :
						glaza_post_meta_cat( false );
						break;
					case 'tag' :
						glaza_post_meta_tag();
						break;
					case 'comment' :
						glaza_post_meta_comment();
						break;
					case 'view' :
						glaza_post_meta_view();
						break;
					default :
						break;
				};
			} ?>

		</div>
	<?php
	}
endif;


/**
 * author info
 */
if ( ! function_exists( 'glaza_single_post_action' ) ) :
	function glaza_single_post_action() {
		$info = glaza_get_option( 'single_post_author_info' ); ?>
		<div class="single-action">
			<?php if ( ! empty( $info ) ) :
				$avatar = glaza_get_option( 'single_post_big_avatar' ); ?>
				<div class="single-author-info post-meta-info">
					<?php if ( ! empty( $avatar ) ) {
						echo get_avatar( get_the_author_meta( 'user_email' ), 60, '', get_the_author_meta( 'display_name' ) );
					};
					glaza_post_meta_author();
					?>
				</div>
			<?php endif; ?>
			<?php glaza_single_post_share_top(); ?>
		</div>
	<?php
	}
endif;


/**
 * render single post share top
 */
if ( ! function_exists( 'glaza_single_post_share_top' ) ):
	function glaza_single_post_share_top() {
		if ( ! function_exists( 'glaza_render_share_icon' ) ) {
			return false;
		}

		$setting = array(
			'facebook'   => glaza_get_option( 'share_top_facebook' ),
			'twitter'    => glaza_get_option( 'share_top_twitter' ),
			'googleplus' => glaza_get_option( 'share_top_googleplus' ),
			'pinterest'  => glaza_get_option( 'share_top_pinterest' ),
			'linkedin'   => glaza_get_option( 'share_top_linkedin' ),
			'tumblr'     => glaza_get_option( 'share_top_tumblr' ),
			'reddit'     => glaza_get_option( 'share_top_reddit' ),
			'vk'         => glaza_get_option( 'share_top_vk' ),
			'email'      => glaza_get_option( 'share_top_email' ),
		);

		if ( ! array_filter( $setting ) ) {
			return false;
		} ?>
		<div class="single-top-share tooltips-n">
			<?php glaza_render_share_icon( $setting ); ?>
		</div>

	<?php
	}
endif;


/**
 * single share at bottom
 */
if ( ! function_exists( 'glaza_single_post_share_bottom' ) ):
	function glaza_single_post_share_bottom() {

		if ( ! function_exists( 'glaza_render_share_icon' ) ) {
			return false;
		}
		$setting = array(
			'facebook'   => glaza_get_option( 'share_bottom_facebook' ),
			'twitter'    => glaza_get_option( 'share_bottom_twitter' ),
			'googleplus' => glaza_get_option( 'share_bottom_googleplus' ),
			'pinterest'  => glaza_get_option( 'share_bottom_pinterest' ),
			'linkedin'   => glaza_get_option( 'share_bottom_linkedin' ),
			'tumblr'     => glaza_get_option( 'share_bottom_tumblr' ),
			'reddit'     => glaza_get_option( 'share_bottom_reddit' ),
			'vk'         => glaza_get_option( 'share_bottom_vk' ),
			'email'      => glaza_get_option( 'share_bottom_email' ),
		);

		if ( ! array_filter( $setting ) ) {
			return false;
		} ?>
		<div class="single-bottom-share tooltips-n">
			<span class="share-label"><?php echo glaza_translate( 'shares' ); ?></span>
			<?php glaza_render_share_icon( $setting ); ?>
		</div>
	<?php
	}
endif;


/**
 * single share at left
 */
if ( ! function_exists( 'glaza_single_post_share_left' ) ):
	function glaza_single_post_share_left() {

		if ( ! function_exists( 'glaza_render_share_icon' ) ) {
			return false;
		}

		$setting = array(
			'facebook'   => glaza_get_option( 'share_left_facebook' ),
			'twitter'    => glaza_get_option( 'share_left_twitter' ),
			'googleplus' => glaza_get_option( 'share_left_googleplus' ),
			'pinterest'  => glaza_get_option( 'share_left_pinterest' ),
			'linkedin'   => glaza_get_option( 'share_left_linkedin' ),
			'tumblr'     => glaza_get_option( 'share_left_tumblr' ),
			'reddit'     => glaza_get_option( 'share_left_reddit' ),
			'vk'         => glaza_get_option( 'share_left_vk' ),
			'email'      => glaza_get_option( 'share_left_email' ),
		);

		if ( ! array_filter( $setting ) ) {
			return false;
		} ?>
		<div class="single-left-share tooltips-w">
			<?php glaza_render_share_icon( $setting ); ?>
		</div>
	<?php
	}
endif;


/**
 * render tag
 */
if ( ! function_exists( 'glaza_single_post_tag' ) ) :
	function glaza_single_post_tag() {

		$tag = glaza_get_option( 'single_post_tag' );
		if ( empty( $tag ) ) {
			return false;
		}

		$tags = get_the_tags();
		if ( ! empty( $tags ) && is_array( $tags ) ) : ?>
			<div class="single-post-tag">
				<span class="tag-label"><?php echo glaza_translate( 'tags' ); ?></span>
				<?php foreach ( $tags as $tags_el ) : ?>
					<a rel="tag" href="<?php echo get_tag_link( $tags_el->term_id ) ?>" title="<?php echo esc_attr( $tags_el->name ) ?>"><?php echo esc_html( $tags_el->name ); ?></a>
				<?php endforeach; ?>
			</div>
		<?php
		endif;
	}
endif;


/**
 * render source
 */
if ( ! function_exists( 'glaza_single_post_source' ) ) :
	function glaza_single_post_source() {

		$source = glaza_get_option( 'single_post_source' );
		if ( empty( $source ) ) {
			return false;
		}

		$source_name = get_post_meta( get_the_ID(), 'glaza_meta_source_name', true );
		$source_url  = get_post_meta( get_the_ID(), 'glaza_meta_source_url', true );

		if ( ! empty( $source_url ) && ! empty( $source_name ) ) : ?>
			<div class="single-post-tag source">
				<span class="tag-label"><?php echo glaza_translate( 'source' ); ?></span>
				<a href="<?php echo esc_url( $source_url ); ?>" title="<?php echo esc_attr( $source_name ); ?>" target="_blank" rel="nofollow"><?php echo esc_html( $source_name ); ?></a>
			</div>
		<?php endif;
	}
endif;


/**
 * render post via
 */
if ( ! function_exists( 'glaza_single_post_via' ) ) :
	function glaza_single_post_via() {

		$via = glaza_get_option( 'single_post_via' );
		if ( empty( $via ) ) {
			return false;
		}

		$via_name = get_post_meta( get_the_ID(), 'glaza_meta_via_name', true );
		$via_url  = get_post_meta( get_the_ID(), 'glaza_meta_via_url', true );
		if ( ! empty( $via_url ) && ! empty( $via_name ) ) : ?>
			<div class="single-post-tag via">
				<span class="tag-label"><?php echo glaza_translate( 'via' ); ?></span>
				<a href="<?php echo esc_url( $via_url ); ?>" title="<?php echo esc_attr( $via_name ); ?>" target="_blank" rel="nofollow"><?php echo esc_html( $via_name ); ?></a>
			</div>
		<?php endif;
	}
endif;


/**
 * single navigation
 */
if ( ! function_exists( 'glaza_single_post_navigation' ) ):
	function glaza_single_post_navigation() {

		$navigation = glaza_get_option( 'single_post_navigation' );
		if ( empty( $navigation ) ) {
			return false;
		}

		$post_previous = get_adjacent_post( false, '', true );
		$post_next     = get_adjacent_post( false, '', false );

		if ( empty( $post_previous ) && empty( $post_next ) ) {
			return false;
		} ?>
		<nav class="single-post-box box-nav clearfix">
			<?php if ( ! empty( $post_previous ) ) : ?>
				<div class="nav-el nav-left">
					<a href="<?php echo get_permalink( $post_previous->ID ); ?>" rel="prev">
						<span class="nav-subtitle"><?php echo glaza_translate( 'previous' ); ?></span>
						<span class="nav-title post-title size-3"><?php echo get_the_title( $post_previous->ID ); ?></span>
					</a>
				</div>
			<?php endif; ?>
			<?php if ( ! empty( $post_next ) ) : ?>
				<div class="nav-el nav-right">
					<a href="<?php echo get_permalink( $post_next->ID ); ?>" rel="next">
						<span class="nav-subtitle"><?php echo glaza_translate( 'next' ); ?></span>
						<span class="nav-title post-title size-3"><?php echo get_the_title( $post_next->ID ); ?></span>
					</a>
				</div>
			<?php endif; ?>
		</nav>
	<?php
	}
endif;


/**
 * single open tag
 */
if ( ! function_exists( 'glaza_single_open_tag' ) ):
	function glaza_single_open_tag() {
		?>
		<article id="post-<?php echo get_the_ID(); ?>" <?php post_class();
		echo ' ' . glaza_schema_markup( 'article' ) ?>>
	<?php
	}
endif;

/**
 * single close tag
 */
if ( ! function_exists( 'glaza_single_close_tag' ) ):
	function glaza_single_close_tag() {
		echo '</article>';
	}
endif;


/**
 * featured credit
 */
if ( ! function_exists( 'glaza_feat_credit' ) ) :
	function glaza_feat_credit() {
		$credit_text = get_post_meta( get_the_ID(), 'glaza_meta_feat_credit', true );
		if ( ! empty( $credit_text ) ): ?>
			<span class="thumb-caption"><?php echo html_entity_decode( esc_html( $credit_text ) ); ?></span>
		<?php
		else :
			$thumbnail_id = get_post_thumbnail_id( get_the_ID() );
			$attachment   = get_posts( array( 'p' => $thumbnail_id, 'post_type' => 'attachment' ) );
			if ( ! empty( $attachment[0]->post_excerpt ) ) : ?>
				<span class="thumb-caption"><?php echo html_entity_decode( esc_html( $attachment[0]->post_excerpt ) ); ?></span>
			<?php endif;
		endif;
	}
endif;


/**
 * @param string $layout
 * render featured image
 */
if ( ! function_exists( 'glaza_single_post_featured_image' ) ) :
	function glaza_single_post_featured_image( $size = '' ) {

		if ( ! has_post_thumbnail() ) {
			return false;
		}
		$feat_check = glaza_check_post_featured();
		if ( 'full' == $feat_check || empty( $size ) ) {
			$size = 'full';
		} ?>
		<div class="single-post-thumb-outer">
			<div class="post-thumb">
				<?php the_post_thumbnail( get_the_ID(), $size ); ?>
			</div>
			<?php glaza_feat_credit(); ?>
		</div>
	<?php
	}
endif;


/**
 * render featured video
 */
if ( ! function_exists( 'glaza_single_post_featured_video' ) ) :
	function glaza_single_post_featured_video() {
		$class_name = 'single-post-thumb-outer video-outer';
		$auto_play  = glaza_check_autoplay();
		if ( ! empty( $auto_play ) && 'on' == $auto_play ) {
			$class_name .= ' is-autoplay';
		} ?>
		<div class="<?php echo esc_attr( $class_name ); ?>">
			<div class="embed-holder">
				<?php echo glaza_embed_video(); ?>
			</div>
		</div>
	<?php
	}
endif;


/**
 * render featured audio
 */
if ( ! function_exists( 'glaza_single_post_featured_audio' ) ) :
	function glaza_single_post_featured_audio() {
		?>
		<div class="single-post-thumb-outer audio-outer">
			<div class="embed-holder">
				<?php echo glaza_embed_audio(); ?>
			</div>
		</div>
	<?php
	}
endif;


/**
 * render featured gallery
 */
if ( ! function_exists( 'glaza_single_post_featured_gallery' ) ) :
	function glaza_single_post_featured_gallery( $size = '' ) {

		$data = get_post_meta( get_the_ID(), 'glaza_meta_gallery_data', false );
		if ( empty( $data ) ) {
			return false;
		}

		if ( empty( $size ) ) {
			$size = 'full';
		}

		$layout = glaza_check_post_gallery();
		if ( 'list' == $layout ) : ?>
			<div class="single-post-thumb-outer gallery-outer gallery-list">
				<div class="post-thumb">
					<?php if ( is_array( $data ) ) :
						foreach ( $data as $gallery_el ) :
							if ( ! empty( $gallery_el ) ) : ?>
								<div class="gallery-el">
									<?php echo wp_get_attachment_image( $gallery_el, $size );
									$caption = wp_get_attachment_caption( $gallery_el );
									if ( ! empty( $caption ) ) : ?>
										<span class="thumb-caption"><?php echo esc_html( $caption ); ?></span>
									<?php endif; ?>
								</div>
							<?php endif;
						endforeach;
					endif; ?>
				</div>
			</div>
		<?php else: ?>
			<div class="single-post-thumb-outer gallery-outer gallery-slider">
				<div class="load-animation"></div>
				<div class="post-thumb pre-load">
					<?php if ( is_array( $data ) ) :
						foreach ( $data as $gallery_el ) :
							if ( ! empty( $gallery_el ) ) : ?>
								<div class="gallery-el gallery-el-outer">
									<div class="gallery-holder">
										<?php echo wp_get_attachment_image( $gallery_el, 'glaza_crop_1200x0' );
										$caption = wp_get_attachment_caption( $gallery_el );
										if ( ! empty( $caption ) ) : ?>
											<span class="thumb-caption"><?php echo esc_html( $caption ); ?></span>
										<?php endif; ?>
									</div>
								</div>
							<?php endif;
						endforeach;
					endif; ?>
				</div>
			</div>
		<?php endif;
	}
endif;


/**
 * render author box
 */
if ( ! function_exists( 'glaza_single_post_author_box' ) ) :
	function glaza_single_post_author_box() {

		$author_id   = get_the_author_meta( 'ID' );
		$data        = glaza_social_profile_user( $author_id );
		$job         = get_the_author_meta( 'job' );
		$name        = get_the_author_meta( 'display_name' );
		$description = get_the_author_meta( 'description' );
		if ( empty( $description ) ) {
			return false;
		} ?>
		<div class="single-post-author clearfix">
			<div class="author-avatar">
				<?php if ( ! is_author() ) : ?>
					<a href="<?php echo get_author_posts_url( $author_id ); ?>"><?php echo get_avatar( get_the_author_meta( 'user_email' ), 100, '', $name ); ?></a>
				<?php else : ?>
					<?php echo get_avatar( get_the_author_meta( 'user_email' ), 100, '', $name ); ?>
				<?php endif; ?>
			</div>
			<div class="author-content">
				<div class="author-title">
					<span class="author-tagline"><?php echo glaza_translate( 'author' ); ?></span>
					<a href="<?php echo get_author_posts_url( $author_id ); ?>"><?php echo esc_html( $name ); ?></a>
				</div>
				<?php if ( ! empty( $job ) ) : ?>
					<div class="author-job"><p><?php echo esc_html( $job ); ?></p></div>
				<?php endif; ?>
				<?php if ( ! empty( $description ) ) : ?>
					<div class="author-description"><?php echo html_entity_decode( esc_html( $description ) ); ?></div>
				<?php endif; ?>
				<div class="author-footer">
					<div class="author-social tooltips-n"><?php echo glaza_render_social_icon( $data, true, false ); ?></div>
					<?php if ( ! is_author() ): ?>
						<div class="author-more">
							<span class="author-tagline"><i class="fa fa-long-arrow-right"></i><?php echo glaza_translate( 'all_posts_by' ); ?></span><a href="<?php echo get_author_posts_url( $author_id ); ?>"><?php echo esc_html( $name ); ?></a>
						</div>
					<?php endif; ?>
				</div>
			</div>
		</div>

	<?php
	}
endif;


/**
 * @return bool
 * render like box
 */
if ( ! function_exists( 'glaza_single_post_like' ) ) :
	function glaza_single_post_like() {
		$box = glaza_get_option( 'single_post_like' );
		if ( empty( $box ) || ! function_exists( 'glaza_render_like' ) ) {
			return false;
		}

		glaza_render_like();
	}
endif;


/**
 * single comment template
 */
if ( ! function_exists( 'glaza_single_comment' ) ):
	function glaza_single_comment() {

		$button = glaza_get_option( 'single_post_comment_btn' );
		if ( ! empty( $button ) ) :

			$comment_number = get_comments_number();
			if ( $comment_number > 1 ) {
				$text = sprintf( glaza_translate( 'show_comments' ), esc_attr( $comment_number ) );
			} elseif ( 1 == $comment_number ) {
				$text = glaza_translate( 'show_comment' );
			} else {
				$text = glaza_translate( 'leave_a_reply' );
			} ?>
			<div class="comment-btn-wrap is-hidden">
				<a href="#" id="comment-action" class="box-comment-btn"><?php echo esc_html( $text ); ?></a>
				<?php comments_template(); ?>
			</div>
		<?php
		else :
			comments_template();
		endif;
	}
endif;


/**
 * single related
 */
if ( ! function_exists( 'glaza_single_related' ) ):
	function glaza_single_related() {

		$box_related = glaza_get_option( 'single_post_box_related' );
		if ( empty( $box_related ) ) {
			return false;
		}
		$query_data = glaza_related_get( get_the_ID() );

		if ( ! method_exists( $query_data, 'have_posts' ) || ! $query_data->have_posts() ) {
			return false;
		}

		$layout = glaza_get_option( 'single_post_box_related_layout' );

		if ( empty( $layout ) ) {
			$layout = 'grid-1';
		}

		$settings                    = array();
		$settings['block_id']        = 'single-related';
		$settings['block_name']      = 'related';
		$settings['class_name']      = 'single-post-related wrap fw-' . esc_attr( $layout );
		$settings['title']           = glaza_get_option( 'single_post_box_related_title' );
		$settings['pagination']      = glaza_get_option( 'single_post_related_pagination' );
		$settings['page_current']    = 1;
		$settings['page_max']        = $query_data->max_num_pages;
		$settings['related_post_id'] = get_the_ID();
		$settings['layout']          = $layout;
		$settings['shopthepost']     = glaza_get_option( 'post_shop' );
		$settings['readmore']        = glaza_get_option( 'post_readmore' );


		if ( 'list' == $settings['layout'] ) {
			$settings['excerpt']         = glaza_get_option( 'blog_excerpt_length_list' );
			$settings['product_columns'] = glaza_get_option( 'list_products_per_row' );
		} else {
			$settings['excerpt']      = glaza_get_option( 'blog_excerpt_length_grid' );
			$settings['post_columns'] = 3;
		}

		glaza_block_open( $settings, $query_data );
		glaza_block_header( $settings );
		glaza_block_content_open( $settings );
		glaza_block_related_listing( $settings, $query_data );
		glaza_block_content_close();
		if ( ! empty( $settings['pagination'] ) && 'none' != $settings['pagination'] ) {
			glaza_pagination( $settings, $query_data );
		}
		glaza_block_close();
		wp_reset_postdata();
	}

endif;


/**
 * block related listing
 */
if ( ! function_exists( 'glaza_block_related_listing' ) ):
	function glaza_block_related_listing( $settings, $query_data ) {
		switch ( $settings['layout'] ) {
			case 'list' :
				glaza_blog_layout_list( $settings, $query_data );
				break;
			case 'grid-2' :
				glaza_blog_layout_grid_2( $settings, $query_data );
				break;
			default :
				glaza_blog_layout_grid_1( $settings, $query_data );
				break;
		}
	}
endif;


/**
 * single review
 */
if ( ! function_exists( 'glaza_single_review' ) ):
	function glaza_single_review( $classes = '' ) {

		$post_id        = get_the_ID();
		$review_summary = get_post_meta( $post_id, 'glaza_review_summary', true );
		$review_pros    = get_post_meta( $post_id, 'glaza_review_pros', true );
		$review_cons    = get_post_meta( $post_id, 'glaza_review_cons', true );
		$total_score    = get_post_meta( $post_id, 'glaza_as', true );

		$review_data = array(
			array(
				'glaza_cd' => get_post_meta( $post_id, 'glaza_cd1', true ),
				'glaza_cs' => get_post_meta( $post_id, 'glaza_cs1', true ),
			),
			array(
				'glaza_cd' => get_post_meta( $post_id, 'glaza_cd2', true ),
				'glaza_cs' => get_post_meta( $post_id, 'glaza_cs2', true ),
			),
			array(
				'glaza_cd' => get_post_meta( $post_id, 'glaza_cd3', true ),
				'glaza_cs' => get_post_meta( $post_id, 'glaza_cs3', true ),
			),
			array(
				'glaza_cd' => get_post_meta( $post_id, 'glaza_cd4', true ),
				'glaza_cs' => get_post_meta( $post_id, 'glaza_cs4', true ),
			),
			array(
				'glaza_cd' => get_post_meta( $post_id, 'glaza_cd5', true ),
				'glaza_cs' => get_post_meta( $post_id, 'glaza_cs5', true ),
			),
			array(
				'glaza_cd' => get_post_meta( $post_id, 'glaza_cd6', true ),
				'glaza_cs' => get_post_meta( $post_id, 'glaza_cs6', true ),
			)
		);

		$class_name   = array();
		$class_name[] = 'review-box-wrap';
		if ( ! empty( $classes ) ) {
			$class_name[] = esc_attr( $classes );
		}

		$class_name = implode( ' ', $class_name ); ?>

		<div class="<?php echo esc_attr( $class_name ); ?>">
			<div class="review-box-inner">
				<h3 class="review-box-title widget-title"><?php echo glaza_translate( 'review_overview' ); ?></h3>

				<div class="review-content-wrap clearfix">
					<?php foreach ( $review_data as $data ) : ?>
						<?php if ( ! empty( $data['glaza_cd'] ) ) : ?>
							<div class="review-el">
								<div class="review-el-inner">
									<span class="review-description"><?php echo esc_html( $data['glaza_cd'] ); ?></span>
									<span class="review-info-score"><?php echo esc_html( $data['glaza_cs'] ); ?></span>
								</div>
								<div class="score-bar-wrap">
									<div class="score-bar score-remove" style="width:<?php echo absint( $data['glaza_cs'] * 10 ); ?>%"></div>
								</div>
							</div>
						<?php endif; ?>
					<?php endforeach; ?>
					<div class="review-summary-wrap">
						<?php if ( ! empty( $review_pros ) || ! empty( $review_cons ) ) : ?>
							<div class="review-pros-cons-wrap">
								<?php if ( ! empty( $review_pros ) ) :
									$review_pros = explode( '/', $review_pros ); ?>
									<div class="review-pros">
										<h3><?php echo glaza_translate( 'pros' ); ?></h3>
										<ul>
											<?php foreach ( $review_pros as $content ) : ?>
												<li><?php echo esc_html( $content ); ?></li>
											<?php endforeach; ?>
										</ul>
									</div>
								<?php endif; ?>
								<?php if ( ! empty( $review_cons ) ) :
									$review_cons = explode( '/', $review_cons ); ?>
									<div class="review-cons">
										<h3><?php echo glaza_translate( 'cons' ); ?></h3>
										<ul>
											<?php foreach ( $review_cons as $content ) : ?>
												<li><?php echo esc_html( $content ); ?></li>
											<?php endforeach; ?>
										</ul>
									</div>
								<?php endif; ?>
							</div>
						<?php endif; ?>
						<?php if ( ! empty( $review_summary ) )  : ?>
							<div class="review-summary-inner">
								<h3><?php echo glaza_translate( 'summary' ); ?></h3>

								<p class="review-summary-desc">
									<span class="post-review-info"><span class="review-info-score"><?php echo esc_html( $total_score ); ?></span></span>
									<?php echo esc_html( $review_summary ); ?>
								</p>
							</div>
						<?php endif; ?>
					</div>
				</div>
			</div>
		</div>
	<?php
	}
endif;

/**
 * single top section
 */
if ( ! function_exists( 'glaza_single_section_top' ) ):
	function glaza_single_section_top() {
		$section = get_post_meta( get_the_ID(), 'glaza_meta_single_top' . true );
		if ( ( empty( $section ) || 'disable' != $section ) && is_active_sidebar( 'glaza_sidebar_single_top' ) ) : ?>
			<div class="single-top-section single-widget-section">
				<?php dynamic_sidebar( 'glaza_sidebar_single_top' ); ?>
			</div>
		<?php endif;
	}
endif;


/**
 * single bottom section
 */
if ( ! function_exists( 'glaza_single_section_bottom' ) ):
	function glaza_single_section_bottom() {
		$section = get_post_meta( get_the_ID(), 'glaza_meta_single_bottom' . true );
		if ( ( empty( $section ) || 'disable' != $section ) && is_active_sidebar( 'glaza_sidebar_single_bottom' ) ) : ?>
			<div class="single-bottom-section single-widget-section">
				<?php dynamic_sidebar( 'glaza_sidebar_single_bottom' ); ?>
			</div>
		<?php endif;
	}
endif;

/**
 * single layout 1
 */
if ( ! function_exists( 'glaza_single_post_layout_1' ) ) :
	function glaza_single_post_layout_1() {

		$sidebar_name     = glaza_post_sidebar_name();
		$sidebar_position = glaza_post_sidebar_position();
		$format           = glaza_check_post_format();

		if ( 'none' == $sidebar_position ) {
			$class_name = 'site-content single-wrap single-1 none-sidebar';
		} else {
			$class_name = 'site-content single-wrap single-1 has-sidebar is-sidebar-' . $sidebar_position;
		} ?>
		<div class="<?php echo esc_attr( $class_name ); ?>">
			<?php glaza_breadcrumb(); ?>
			<div class="wrap container clearfix">
				<main id="main" class="site-main single-inner" role="main">
					<?php glaza_single_open_tag(); ?>
					<header class="single-post-header entry-header">
						<?php
						glaza_single_post_meta_info();
						glaza_single_post_title();
						glaza_single_post_tagline();
						glaza_single_post_action();
						switch ( $format ) {
							case 'video' :
								glaza_single_post_featured_video();
								break;
							case 'audio' :
								glaza_single_post_featured_audio();
								break;
							case 'gallery' :
								if ( 'none' == $sidebar_position ) {
									glaza_single_post_featured_gallery( 'glaza_crop_1200x0' );
								} else {
									glaza_single_post_featured_gallery( 'glaza_crop_800x0' );
								}
								break;
							default:
								if ( 'none' == $sidebar_position ) {
									glaza_single_post_featured_image( 'glaza_crop_1200x0' );
								} else {
									glaza_single_post_featured_image( 'glaza_crop_800x0' );
								}
								break;
						} ?>
					</header>
					<?php glaza_single_post_entry(); ?>
					<div class="entry-footer clearfix">
						<?php
						glaza_single_post_tag();
						glaza_single_post_source();
						glaza_single_post_via();
						?>
					</div>
					<?php
					glaza_single_close_tag();
					glaza_single_post_author_box();
					glaza_single_post_navigation();
					glaza_single_comment();
					?>
				</main>
				<?php if ( 'none' != $sidebar_position ) :
					glaza_render_sidebar( $sidebar_name );
				endif; ?>
			</div>
			<?php glaza_single_related(); ?>
		</div>
	<?php
	}
endif;


/**
 * single layout 2
 */
if ( ! function_exists( 'glaza_single_post_layout_2' ) ) :
	function glaza_single_post_layout_2() {

		$sidebar_name     = glaza_post_sidebar_name();
		$sidebar_position = glaza_post_sidebar_position();
		$format           = glaza_check_post_format();

		if ( 'none' == $sidebar_position ) {
			$class_name = 'site-content single-wrap single-2 none-sidebar';
		} else {
			$class_name = 'site-content single-wrap single-2 has-sidebar is-sidebar-' . $sidebar_position;
		} ?>
		<div class="<?php echo esc_attr( $class_name ); ?>">
			<div class="top-featured">
				<?php glaza_single_post_featured_image( 'full' ); ?>
			</div>
			<div class="wrap container clearfix">
				<main id="main" class="site-main single-inner" role="main">
					<?php glaza_breadcrumb(); ?>
					<?php glaza_single_open_tag(); ?>
					<header class="single-post-header entry-header">
						<?php
						glaza_single_post_meta_info();
						glaza_single_post_title();
						glaza_single_post_tagline();
						glaza_single_post_action();
						switch ( $format ) {
							case 'video' :
								glaza_single_post_featured_video();
								break;
							case 'audio' :
								glaza_single_post_featured_audio();
								break;
							case 'gallery' :
								if ( 'none' == $sidebar_position ) {
									glaza_single_post_featured_gallery( 'glaza_crop_1200x0' );
								} else {
									glaza_single_post_featured_gallery( 'glaza_crop_800x0' );
								}
								break;
							default:
								break;
						} ?>
					</header>
					<?php glaza_single_post_entry(); ?>
					<div class="entry-footer clearfix">
						<?php
						glaza_single_post_tag();
						glaza_single_post_source();
						glaza_single_post_via();
						?>
					</div>
					<?php
					glaza_single_close_tag();
					glaza_single_post_author_box();
					glaza_single_post_navigation();
					glaza_single_comment();
					?>
				</main>
				<?php if ( 'none' != $sidebar_position ) :
					glaza_render_sidebar( $sidebar_name );
				endif; ?>
			</div>
			<?php glaza_single_related(); ?>
		</div>
	<?php
	}
endif;


/**
 * single layout 3
 */
if ( ! function_exists( 'glaza_single_post_layout_3' ) ) :
	function glaza_single_post_layout_3() {

		$sidebar_name     = glaza_post_sidebar_name();
		$sidebar_position = glaza_post_sidebar_position();
		$format           = glaza_check_post_format();

		if ( 'none' == $sidebar_position ) {
			$class_name = 'site-content single-wrap single-3 none-sidebar';
		} else {
			$class_name = 'site-content single-wrap single-3 has-sidebar is-sidebar-' . $sidebar_position;
		} ?>
		<div class="<?php echo esc_attr( $class_name ); ?>">
			<div class="container">
				<div class="top-featured">
					<?php switch ( $format ) {
						case 'video' :
							glaza_single_post_featured_video();
							break;
						case 'audio' :
							glaza_single_post_featured_audio();
							break;
						case 'gallery' :
							glaza_single_post_featured_gallery( 'glaza_crop_1200x0' );
							break;
						default:
							glaza_single_post_featured_image( 'glaza_crop_1200x0' );
							break;
					} ?>
				</div>
			</div>
			<div class="wrap container clearfix">
				<main id="main" class="site-main single-inner" role="main">
					<?php glaza_breadcrumb(); ?>
					<?php glaza_single_open_tag(); ?>
					<header class="single-post-header entry-header">
						<?php
						glaza_single_post_meta_info();
						glaza_single_post_title();
						glaza_single_post_tagline();
						glaza_single_post_action();
						?>
					</header>
					<?php glaza_single_post_entry(); ?>
					<div class="entry-footer clearfix">
						<?php
						glaza_single_post_tag();
						glaza_single_post_source();
						glaza_single_post_via();
						?>
					</div>
					<?php
					glaza_single_close_tag();
					glaza_single_post_author_box();
					glaza_single_post_navigation();
					glaza_single_comment();
					?>
				</main>
				<?php if ( 'none' != $sidebar_position ) :
					glaza_render_sidebar( $sidebar_name );
				endif; ?>
			</div>
			<?php glaza_single_related(); ?>
		</div>
	<?php
	}
endif;


/**
 * single layout 4
 */
if ( ! function_exists( 'glaza_single_post_layout_4' ) ) :
	function glaza_single_post_layout_4() {

		$sidebar_name     = glaza_post_sidebar_name();
		$sidebar_position = glaza_post_sidebar_position();
		$format           = glaza_check_post_format();

		if ( 'none' == $sidebar_position ) {
			$class_name = 'site-content single-wrap single-4 none-sidebar';
		} else {
			$class_name = 'site-content single-wrap single-4 has-sidebar is-sidebar-' . $sidebar_position;
		} ?>
		<div class="<?php echo esc_attr( $class_name ); ?>">
			<?php glaza_breadcrumb(); ?>
			<div class="wrap container clearfix">
				<main id="main" class="site-main single-inner" role="main">
					<?php glaza_single_open_tag(); ?>
					<header class="single-post-header is-light-text entry-header">
						<div class="header-holder">
							<?php
							glaza_single_post_meta_info();
							glaza_single_post_title();
							glaza_single_post_tagline();
							glaza_single_post_action();
							?>
						</div>
						<?php switch ( $format ) {
							case 'video' :
								glaza_single_post_featured_video();
								break;
							case 'audio' :
								glaza_single_post_featured_audio();
								break;
							case 'gallery' :
								if ( 'none' == $sidebar_position ) {
									glaza_single_post_featured_gallery( 'glaza_crop_1200x0' );
								} else {
									glaza_single_post_featured_gallery( 'glaza_crop_800x0' );
								}
								break;
							default:
								if ( 'none' == $sidebar_position ) {
									glaza_single_post_featured_image( 'glaza_crop_1200x0' );
								} else {
									glaza_single_post_featured_image( 'glaza_crop_800x0' );
								}
								break;
						} ?>
					</header>
					<?php glaza_single_post_entry(); ?>
					<div class="entry-footer clearfix">
						<?php
						glaza_single_post_tag();
						glaza_single_post_source();
						glaza_single_post_via();
						?>
					</div>
					<?php
					glaza_single_close_tag();
					glaza_single_post_author_box();
					glaza_single_post_navigation();
					glaza_single_comment();
					?>
				</main>
				<?php if ( 'none' != $sidebar_position ) :
					glaza_render_sidebar( $sidebar_name );
				endif; ?>
			</div>
			<?php glaza_single_related(); ?>
		</div>
	<?php
	}
endif;


/**
 * single layout 5
 */
if ( ! function_exists( 'glaza_single_post_layout_5' ) ) :
	function glaza_single_post_layout_5() {
		$format = glaza_check_post_format();
		?>
		<div class="site-content single-wrap single-5 none-sidebar">
			<?php glaza_breadcrumb(); ?>
			<div class="wrap container clearfix">
				<main id="main" class="site-main single-inner" role="main">
					<?php glaza_single_open_tag(); ?>
					<header class="single-post-header entry-header is-centered">
						<?php
						glaza_single_post_meta_info();
						glaza_single_post_title();
						glaza_single_post_tagline();
						glaza_single_post_action();
						switch ( $format ) {
							case 'video' :
								glaza_single_post_featured_video();
								break;
							case 'audio' :
								glaza_single_post_featured_audio();
								break;
							case 'gallery' :
								glaza_single_post_featured_gallery( 'glaza_crop_800x0' );
								break;
							default:
								glaza_single_post_featured_image( 'glaza_crop_800x0' );
								break;
						}
						?>
					</header>
					<?php glaza_single_post_entry(); ?>
					<div class="entry-footer clearfix">
						<?php
						glaza_single_post_tag();
						glaza_single_post_source();
						glaza_single_post_via();
						?>
					</div>
					<?php
					glaza_single_close_tag();
					glaza_single_post_author_box();
					glaza_single_post_navigation();
					glaza_single_comment();
					?>
				</main>
			</div>
			<?php glaza_single_related(); ?>
		</div>
	<?php
	}
endif;


/**
 * single layout 6
 */
if ( ! function_exists( 'glaza_single_post_layout_6' ) ) :
	function glaza_single_post_layout_6() {

		$sidebar_name     = glaza_post_sidebar_name();
		$sidebar_position = glaza_post_sidebar_position();


		if ( 'none' == $sidebar_position ) {
			$class_name = 'site-content single-wrap single-6 none-sidebar';
		} else {
			$class_name = 'site-content single-wrap single-6 has-sidebar is-sidebar-' . $sidebar_position;
		} ?>
		<div class="<?php echo esc_attr( $class_name ); ?>">
			<?php glaza_breadcrumb(); ?>
			<div class="wrap container clearfix">
				<main id="main" class="site-main single-inner" role="main">
					<?php glaza_single_open_tag(); ?>
					<header class="single-post-header entry-header">
						<?php
						glaza_single_post_meta_info();
						glaza_single_post_title();
						glaza_single_post_tagline();
						glaza_single_post_action();
						?>
					</header>
					<?php glaza_single_post_entry(); ?>
					<div class="entry-footer clearfix">
						<?php
						glaza_single_post_tag();
						glaza_single_post_source();
						glaza_single_post_via();
						?>
					</div>
					<?php
					glaza_single_close_tag();
					glaza_single_post_author_box();
					glaza_single_post_navigation();
					glaza_single_comment();
					?>
				</main>
				<?php if ( 'none' != $sidebar_position ) :
					glaza_render_sidebar( $sidebar_name );
				endif; ?>
			</div>
			<?php glaza_single_related(); ?>
		</div>
	<?php
	}
endif;

Youez - 2016 - github.com/yon3zu
LinuXploit