forked from webjyh/presence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-image.php
54 lines (54 loc) · 2.21 KB
/
content-image.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
<div class="post-wrap" >
<div class="m-post">
<a class="typeicon image" href="<?php the_permalink(); ?>"></a>
<div class="content">
<h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'presence' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="text">
<?php
$presence_values = get_option('presence_framework_values');
if ( !is_array( $presence_values ) ) $presence_values = array();
if ( array_key_exists( 'general_summary' , $presence_values ) && $presence_values['general_summary'] == 'on' ) {
$img = get_post_thumb( 'false' );
if ( !empty( $img ) ) {
echo '<p style="text-align:center;"><a href="'.$img.'" class="phzoom" title="';
echo the_title();
echo '"><img src="'.$img.'" alt="';
echo the_title();
echo '" /></a></p>';
}
if ( array_key_exists( 'text_length', $presence_values ) && !empty( $presence_values['text_length'] ) ){
$strlen = intval( $presence_values['text_length'] );
} else {
$strlen = 350;
}
echo '<p>'.mb_strimwidth( strip_tags(apply_filters('the_content', $post->post_content)), 0, $strlen, " [...]").'</p>';
} else {
the_content();
}
?>
</div>
<?php edit_post_link( __( 'Edit', 'presence' ), '<span class="edit-link">', '</span>' ); ?>
</div>
</div>
<div class="m-infoarea clearfix">
<a class="time" href="<?php the_permalink(); ?>"><?php echo get_the_date(); ?></a>
<?php if(function_exists('the_views')) { ?>
<a href="<?php the_permalink(); ?>" class="like"><?php echo the_views('Views', true);?></a>
<?php } ?>
<?php comments_popup_link( '0', '1', '%', 'comment' ); ?>
<span class="sep">/</span>
<div class="from"><span class="reblog"><?php the_category(' '); ?></span></div>
<span class="sep">/</span>
<div class="tagarea clearfix">
<span class="taglb"><?php _e( 'Tag: ', 'presence' ); ?></span>
<?php
$taglist = get_the_tag_list( '', '' );
if ( $taglist ) {
echo $taglist;
} else {
echo __( 'No Tags', 'presence' );
}
?>
</div>
</div>
</div>