-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-video.php
45 lines (42 loc) · 1.49 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
<article <?php post_class("post-wrap"); ?>>
<div class="post-media">
<?php rentit_theme_oembed_videos(); ?>
</div>
<div class="post-header">
<?php
if (is_single()) :
the_title('<h2 class="post-title">', '</h2>');
else :
the_title(sprintf('<h2 class="post-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>');
endif;
?>
<?php get_template_part('meta'); ?>
</div>
<div class="post-body">
<div class="post-excerpt">
<p>
<?php
if (is_single()) {
//rentit_remove_video_from_content();
ob_start();
the_content();
echo preg_replace('/<iframe.*?>/','',ob_get_clean(),1);
} else {
// Remove embed.
$content = preg_replace("/<embed[^>]+>/i", "", rentit_limit_excerpt(rentit_words_limit()), 1);
echo wp_kses_post($content);
}
?></p>
</div>
</div>
<?php if (!is_single()) : ?>
<div class="post-footer">
<span class="post-read-more">
<a href="<?php echo esc_url(get_permalink()); ?>"
class="btn btn-theme btn-theme-transparent btn-icon-left">
<?php echo apply_filters('rentit_readmore_text', esc_html__('Read More', 'rentit')); ?>
</a>
</span>
</div>
<?php endif; ?>
</article>