-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent.php
99 lines (96 loc) · 3.85 KB
/
content.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
<?php
$classes = array(
'panel',
'panel-default'
)
?>
<article id="post-<?php the_ID(); ?>" <?php post_class($classes); ?>>
<header class="panel-heading">
<?php if (is_sticky() && is_home() && !is_paged()) {
$post_format_label = 'primary';
$post_format_icon = 'pushpin';
$post_format = esc_html_x('Featured',
'used before post titles',
'goule'
);
} elseif (post_password_required()) {
$post_format_label = 'danger';
$post_format_icon = 'ban-circle';
$post_format = esc_html_x('Protected',
'used before post titles',
'goule'
);
} else {
$post_format = get_post_format() == '' ? esc_html_x('Standard', 'used before post titles',
'goule') : get_post_format();
$post_format_label = 'default';
switch ($post_format) {
case 'aside':
$post_format = esc_html__('aside', 'goule');
$post_format_icon = 'pencil';
break;
case 'gallery':
$post_format = esc_html__('gallery', 'goule');
$post_format_icon = 'th-large';
break;
case 'link':
$post_format = esc_html__('link', 'goule');
$post_format_icon = 'link';
break;
case 'image':
$post_format = esc_html__('image', 'goule');
$post_format_icon = 'picture';
break;
case 'quote':
$post_format = esc_html__('quote', 'goule');
$post_format_icon = 'scissors';
break;
case 'status':
$post_format = esc_html__('status', 'goule');
$post_format_icon = 'comment';
break;
case 'video':
$post_format = esc_html__('video', 'goule');
$post_format_icon = 'film';
break;
case 'audio':
$post_format = esc_html__('audio', 'goule');
$post_format_icon = 'headphones';
break;
case 'chat':
$post_format = esc_html__('chat', 'goule');
$post_format_icon = 'user';
break;
default:
$post_format_icon = 'file';
break;
}
} ?>
<div class="sticky-post"><a
href="<?php echo esc_url(get_permalink()); ?>"><span
class="label label-<?php echo $post_format_label; ?> pull-left"><span
class="glyphicon glyphicon-<?php echo $post_format_icon; ?>"
aria-hidden="true"></span>
<?php echo $post_format; ?></span></a></div>
<?php the_title(sprintf('<div class="entry-title"><a href="%s" rel="bookmark">',
esc_url(get_permalink())
),
'</a></div>'
); ?>
</header><!-- .entry-header -->
<?php if( !(is_sticky() && is_home() && !is_paged() )): ?>
<div class="entry-content panel-body">
<?php
if (has_post_thumbnail()) {
?>
<div class="post-thumbnail-wrap">
<?php the_post_thumbnail(); ?>
</div>
<?php }
/* translators: %s: Name of current post */
the_content();
?>
<div class="clearfix"></div>
</div><!-- .entry-content -->
<?php endif; ?>
</article><!-- #post-## -->