-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-video.php
101 lines (95 loc) · 6.08 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* The default template for displaying content video
* @package injob
*/
$post = get_post();
$contents = $post->post_content;
$video = inwave_getElementsByTag('embed', $contents);
$str_regux = $video[0];
$show_comment = (Inwave_Helper::getThemeOption('blog_show_post_comment') && comments_open() && get_comments_number());
$img = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
$img_src = is_array($img) && !empty($img) ? $img[0] : '';
?>
<article id="post-<?php echo esc_attr(get_the_ID()); ?>" <?php post_class(); ?> itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
<div class="post-item fit-video <?php echo (!$str_regux && !$img_src ? 'no-featured-image' : ''); ?>">
<?php if ($video) { ?>
<div class="post-video">
<?php echo apply_filters('the_content', $video[0]); ?>
</div>
<?php }elseif($img_src){ ?>
<div class="post-image">
<img itemprop="image" src="<?php echo esc_url($img_src); ?>" alt="">
</div>
<?php } ?>
<div class="post-content">
<div class="post-main-info">
<?php if(Inwave_Helper::getThemeOption('blog_show_categories') || Inwave_Helper::getThemeOption('blog_show_post_date') || is_sticky()){ ?>
<div class="post-meta">
<ul>
<?php if(Inwave_Helper::getThemeOption('blog_show_categories')){ ?>
<li><i class="ion-android-folder-open"></i> <?php the_category(', ') ?></li>
<?php } ?>
<?php if(Inwave_Helper::getThemeOption('blog_show_post_date')){ ?>
<li><i class="ion-android-calendar"></i>
<span itemprop="dateModified" content="<?php echo get_the_date( 'c' );?>"></span>
<span itemprop="datePublished" content="<?php echo get_the_date( 'c' );?>"> <?php the_date(); ?></span>
</li>
<?php } ?>
</ul>
<?php if (is_sticky()){echo '<span class="feature-post">'.esc_html__('Sticky post', 'injob').'</span>';} ?>
</div>
<?php } ?>
<h3 class="post-title entry-title" itemprop="name">
<span itemprop="headline" content="<?php the_title('', ''); ?>"></span>
<a href="<?php echo esc_url(get_the_permalink()); ?>"><?php the_title('', ''); ?></a>
</h3>
<div class="post-desc" itemprop="mainEntityOfPage" itemscope itemtype="http://schema.org/WebPage">
<?php /* translators: %s: Name of current post */
echo get_the_excerpt();
wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">' . esc_html__('Pages:', 'injob') . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>'));
?>
</div>
<?php if($show_comment || Inwave_Helper::getThemeOption('blog_show_social_sharing') || Inwave_Helper::getThemeOption('blog_show_post_author')){ ?>
<div class="post-bar clearfix">
<?php if(Inwave_Helper::getThemeOption('blog_show_post_author') || $show_comment){ ?>
<div class="post-bar-left">
<?php if(Inwave_Helper::getThemeOption('blog_show_post_author')){ ?>
<div class="post-author <?php echo ($show_comment ? 'has-post-comment' : ''); ?>">
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization" style="display: none;">
<a itemprop="url">
<span itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<img itemprop="url" src="<?php echo $img_src?>" alt="LOGO">
<meta itemprop="width" content="600">
<meta itemprop="height" content="60">
</span>
</a>
<span itemprop="name"><?php echo get_the_author_posts_link(); ?></span>
</div>
<?php echo esc_html__('by: ', 'injob'); ?> <span itemprop="author" itemtype="http://schema.org/Person"><?php echo get_the_author_posts_link(); ?></span>
</div>
<?php } ?>
<?php if($show_comment){ ?>
<div class="post-comment-count">
<?php comments_popup_link(esc_html__('0 comment', 'injob'), esc_html__('1 Comment', 'injob'), esc_html__('% Comments', 'injob')); ?>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if(Inwave_Helper::getThemeOption('single_show_social_sharing')){ ?>
<div class="post-bar-right">
<div class="post-social-share">
<span class="share-title"><?php echo esc_html__('Share : ','injob'); ?></span>
<?php
inwave_social_sharing(get_permalink(), Inwave_Helper::substrword(get_the_excerpt(), 10), get_the_title());
?>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="clearfix"></div>
</div>
</article><!-- #post-## -->