-
Notifications
You must be signed in to change notification settings - Fork 14
/
content-gallery.php
84 lines (70 loc) · 2.88 KB
/
content-gallery.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* Template part for displaying gallery format posts.
*
* @since vantage 1.5.8
*
* @license GPL 2.0
*/
$gallery = get_post_gallery( get_the_ID(), false );
$content = vantage_strip_gallery( get_the_content() );
$content = str_replace( ']]>', ']]>', apply_filters( 'the_content', $content ) );
$post_class = ( is_singular() ) ? 'post' : '';
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
<div class="entry-main">
<?php do_action( 'vantage_entry_main_top' ); ?>
<?php if ( ( the_title( '', '', false ) && siteorigin_page_setting( 'page_title' ) ) || ( has_post_thumbnail() && siteorigin_setting( 'blog_featured_image' ) ) || has_post_format( 'gallery' ) && $gallery != '' || ( siteorigin_setting( 'blog_post_metadata' ) && get_post_type() == 'post' ) ) { ?>
<header class="entry-header">
<?php if ( $gallery != '' ) { ?>
<div class="flexslider gallery-format-slider">
<ul class="slides gallery-format-slides">
<?php foreach ( $gallery['src'] as $image ) { ?>
<li class="gallery-format-slide">
<img src="<?php echo $image; ?>">
</li>
<?php } ?>
<ul>
</div>
<?php } elseif ( has_post_thumbnail() && siteorigin_setting( 'blog_featured_image' ) ) { ?>
<div class="entry-thumbnail">
<?php if ( is_singular() ) { ?>
<?php vantage_entry_thumbnail(); ?>
<?php } else { ?>
<a href="<?php the_permalink(); ?>">
<?php vantage_entry_thumbnail(); ?>
</a>
<?php } ?>
</div>
<?php } ?>
<?php if ( is_singular() ) { ?>
<?php if ( the_title( '', '', false ) && siteorigin_page_setting( 'page_title' ) ) { ?>
<?php the_title( '<h1 class="entry-title test">', '</h1>' ); ?>
<?php } ?>
<?php } else { ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'vantage' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php } ?>
<?php if ( siteorigin_setting( 'blog_post_metadata' ) && get_post_type() == 'post' ) { ?>
<div class="entry-meta">
<?php vantage_posted_on(); ?>
</div><!-- .entry-meta -->
<?php } ?>
</header><!-- .entry-header -->
<?php } ?>
<div class="entry-content">
<?php echo $content; ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'vantage' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( is_singular() && vantage_get_post_categories() && ! is_singular( 'jetpack-testimonial' ) ) { ?>
<div class="entry-categories">
<?php echo vantage_get_post_categories(); ?>
</div>
<?php } ?>
<?php
if ( is_singular() && siteorigin_setting( 'blog_author_box' ) ) {
vantage_author_box( $post );
}
?>
<?php do_action( 'vantage_entry_main_bottom' ); ?>
</div>
</article><!-- #post-<?php the_ID(); ?> -->