File "content.php"

Full Path: /var/www/bvnghean.vn/save_bvnghean.vn/wp-content/themes/publisher/views/general/post/content.php
File size: 4.48 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/**
 * post.php
 *---------------------------
 * The template for displaying posts
 *
 */

$post_format = get_post_format();

$thumbnail_size = 'publisher-lg';
if ( publisher_get_page_layout() == '1-col' ) {
	$thumbnail_size = 'publisher-full';
}

$img = publisher_get_thumbnail( $thumbnail_size );

$post_settings = publisher_get_option( 'post-page-settings' );

$social_share = publisher_get_option( 'social_share_single' );

?>
	<div class="single-container">
		<article <?php publisher_attr( 'post', 'single-post-content ' . ( ! empty( $img['src'] ) ? 'has-thumbnail' : '' ) ); ?>>

			<div class="post-header post-tp-1-header">
				<?php

				if ( has_post_format( 'link' ) ) {
					?>
					<h1 class="single-post-title">
						<a <?php publisher_attr( 'post-url' ); ?>><span <?php publisher_attr( 'post-title' ); ?>><?php the_title(); ?></span></a>
					</h1>
					<?php
				} else {
					?>
					<h1 class="single-post-title">
						<span <?php publisher_attr( 'post-title' ); ?>><?php the_title(); ?></span></h1>
					<?php
				}

				if ( $post_settings['meta']['show'] || $post_settings['term'] ) {

					?>
					<div class="post-meta-wrap clearfix">
						<?php

						if ( $post_settings['term'] ) {
							publisher_cats_badge_code( get_post_format() ? 2 : 3, '', TRUE );
						}

						if ( $post_settings['meta']['show'] ) {
							publisher_set_prop( 'hide-meta-author', ! $post_settings['meta']['author'] );
							publisher_set_prop( 'hide-meta-date', ! $post_settings['meta']['date'] );
							publisher_set_prop( 'hide-meta-views', ! $post_settings['meta']['views'] );
							publisher_set_prop( 'hide-meta-comment', ! $post_settings['meta']['comment'] );
							publisher_set_prop( 'hide-meta-review', ! $post_settings['meta']['review'] );
							publisher_get_view( 'post', '_meta' );
						}

						?>
					</div>
					<?php

				}


				// Social share buttons
				if ( $social_share == 'show' || $social_share == 'top-bottom' ) {
					publisher_listing_social_share( '', 'single-post-share top-share', TRUE );
				}


				?>
				<div class="single-featured">
					<?php


					// Gallery Post Format
					if ( $post_format == 'gallery' ) {
						publisher_get_view( 'post', '_gallery' );
					} // Video/Audio Post Format
					elseif ( $post_format == 'video' || $post_format == 'audio' ) {
						echo do_shortcode( apply_filters( 'better-framework/content/auto-embed', bf_get_post_meta( '_featured_embed_code' ) ) );
					} // Simple Thumbnail
					elseif ( ! empty( $img['src'] ) ) {
						?>
						<a <?php publisher_attr( 'post-thumbnail-url', '', 'full' ); ?>>
							<img src="<?php echo $img['src']; ?>" alt="<?php the_title_attribute(); ?>">
						</a>
						<?php
					}

					if ( bf_get_post_meta( 'bs_featured_image_credit' ) != '' ) {
						?>
						<span class="image-credit"><?php bf_echo_post_meta( 'bs_featured_image_credit' ); ?></span>
						<?php
					}

					?>
				</div>
			</div>


			<div <?php publisher_attr( 'post-content', 'clearfix single-post-content' ); ?>>
				<?php publisher_the_content(); ?>
			</div>
			<?php

			// Shows source
			if ( bf_get_post_meta( '_bs_source_url' ) || bf_get_post_meta( '_bs_source_url_2' ) || bf_get_post_meta( '_bs_source_url_3' ) ) {
				publisher_get_view( 'post', '_source', 'default' );
			}

			// Shows via
			if ( bf_get_post_meta( '_bs_via_url' ) || bf_get_post_meta( '_bs_via_url_2' ) || bf_get_post_meta( '_bs_via_url_3' ) ) {
				publisher_get_view( 'post', '_via', 'default' );
			}

			// Shows post tags
			if ( publisher_has_tag() ) {
				publisher_get_view( 'post', '_tags', 'default' );
			}

			// Social share buttons
			if ( $social_share == 'bottom' || $social_share == 'top-bottom' ) {
				publisher_listing_social_share( '', 'single-post-share bottom-share', TRUE );
			}

			// post info for SEO
			publisher_get_view( 'post', '_info', 'default' );

			?>
		</article>
		<?php

		// Before author box ads
		publisher_show_ad_location( 'post_before_author_box', array( 'container-class' => 'adloc-post-before-author' ) );

		// Author box
		if ( publisher_get_option( 'post_author_box' ) == 'show' ) {
			publisher_get_view( 'post', '_author' );
		}

		?>
	</div>
<?php

// Related posts
if ( publisher_get_related_post_type() == 'show' ) {
	publisher_get_view( 'post', '_related' );
}

// Comments and comment form
publisher_comments_template();

// Ad after first post for related posts
if ( publisher_get_related_post_type() == 'infinity-related-post' ) {
	publisher_show_ad_location( 'post_ajax_related', array( 'container-class' => 'adloc-ajaxed-related' ) );
}