forked from themesdefrance/Galopin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-header-meta.php
70 lines (51 loc) · 2.09 KB
/
content-header-meta.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
<?php
$post_header_date = apply_filters('galopin_post_header_date', true);
$post_header_author = apply_filters('galopin_post_header_author', true);
$post_header_category = apply_filters('galopin_post_header_category', true);
$post_header_comments = apply_filters('galopin_post_header_comments', true);
?>
<div class="entry-meta post-header-meta">
<?php
if($post_header_date || $post_header_author || $post_header_category){
_e('Published ','galopin');
}
if($post_header_date){ ?>
<?php _e('on','galopin'); ?>
<time class="date published" itemprop="datePublished" datetime="<?php the_time('c'); ?>">
<?php the_time( get_option( 'date_format' ) ); ?>
</time>
<?php if (get_the_modified_time() != get_the_time()) { ?>
<time class="date updated" itemprop="dateModified" datetime="<?php the_modified_time('c'); ?>" >
<?php the_modified_time(get_option( 'date_format' )); ?>
</time>
<?php }
}
if($post_header_author){ ?>
<?php _e('by','galopin'); ?>
<span class="vcard author">
<span class="fn" itemprop="author" itemscope="itemscope" itemtype="http://schema.org/Person">
<a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" itemprop="url" rel="author"><?php the_author_meta('display_name'); ?></a>
</span>
</span>
<?php
}
if($post_header_category){
if(!is_category()){
printf(__('in','galopin') . ' ' . get_the_category_list('/') . ' ');
}
}
if($post_header_date || $post_header_author || $post_header_category){
echo '| ';
}
if($post_header_comments){
if(comments_open()){ ?>
<a href="<?php the_permalink(); ?>#comments" itemprop="discussionUrl">
<?php comments_number( __('No Comment', 'galopin') . '<meta itemprop="interactionCount" content="0 UserComments">',
__('One Comment', 'galopin') . '<meta itemprop="interactionCount" content="1 UserComments">',
__('% Comments', 'galopin') . '<meta itemprop="interactionCount" content="% UserComments">'); ?></a>
<?php
}
}
edit_post_link(__('Edit', 'galopin'), ' | ');
?>
</div><!--END .entry-meta-->