-
Notifications
You must be signed in to change notification settings - Fork 1
/
content-video.php
69 lines (53 loc) · 1.97 KB
/
content-video.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
<?php
/**
* The template for displaying the video post format on archives.
*
* @package Silk Lite
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
//get the media objects from the content and bring up only the first one
$media = silklite_video_attachment(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header entry-header--card">
<?php if ( 'post' == get_post_type() ) { ?>
<div class="entry-meta entry-meta--card">
<?php silklite_posted_on_and_cats(); ?>
</div><!-- .entry-meta -->
<?php }
/* translators: %s: The post URL. */
the_title( sprintf( '<h2 class="entry-title entry-title--card"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php if ( ! empty( $media ) ) { ?>
<div class="entry-media">
<?php echo $media; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div><!-- .entry-media -->
<?php
}
global $post;
// Check the content for the more text
$has_more = strpos( $post->post_content, '<!--more' );
if ( $has_more ) {
the_content( sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Continue reading %s', 'silk-lite' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
} else {
the_excerpt();
}
wp_link_pages( array(
'before' => '<div class="page-links"><span class="pagination-title">' . esc_html__( 'Pages:', 'silk-lite' ),
'after' => '</span></div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'silk-lite' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) ); ?>
<span class="separator separator-wrapper--accent">
<?php get_template_part( 'assets/svg/separator-simple' ); ?>
</span>
</div><!-- .entry-content -->
</article><!-- #post-## -->