-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
139 lines (130 loc) · 5.95 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
/**
* The default template for displaying content
*
* Used for both single and index/archive/search.
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> itemid="<?php the_permalink(); ?>" itemscope itemtype="http://schema.org/BlogPosting">
<div class="panel panel-default">
<div class="panel-body">
<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
<div class="featured-post">
<?php _e( 'Featured post', 'twentytwelve' ); ?>
</div>
<?php endif; ?>
<header class="entry-header">
<?php if ( is_single() ) : ?>
<h1 class="entry-title" itemprop="headline"><?php the_title(); ?></h1>
<?php else : ?>
<h1 class="entry-title">
<a href="<?php the_permalink(); ?>" rel="bookmark">
<span itemprop="headline"><?php the_title(); ?></span>
</a>
</h1>
<?php endif; // is_single() ?>
<?php if ( comments_open() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
</div><!-- .comments-link -->
<?php endif; // comments_open() ?>
<?php if ( ! post_password_required() && ! is_attachment() ) :
if ( has_post_thumbnail() ) :
$image_data = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="<?php echo $image_data[0] ?>">
<meta itemprop="width" content="<?php echo $image_data[1] ?>">
<meta itemprop="height" content="<?php echo $image_data[2] ?>">
<?php the_post_thumbnail(array(523, 275), array('src' => $image_data[0], 'alt' => get_the_title(), 'title' => get_the_title())); ?>
</div>
</a>
<?php else : ?>
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="https://www.steffanick.com/android-chrome-192x192.png">
<meta itemprop="width" content="192">
<meta itemprop="height" content="192">
</div>
<?php endif;
endif; ?>
</header><!-- .entry-header -->
<div class="entry-byline-dateline entry-meta">
<small>
<span class="byline" itemprop="author creator copyrightHolder" itemid="<?php echo get_the_author_meta('url'); ?>" itemscope itemtype="http://schema.org/Person">
By
<span class="author vcard">
<a class="url fn n" href="<?php echo get_the_author_meta('url'); ?>" title="Visit <?php echo get_the_author(); ?>’s website">
<span class="byline-author" itemprop="name">
<?php echo get_the_author(); ?>
</span>
</a>
</span>
</span>
<meta itemprop="copyrightYear" content="<?php echo get_the_date('Y'); ?>">
<meta itemprop="dateCreated" content="<?php echo get_the_date('c'); ?>">
<span class="dateline posted-on">
<time class="entry-date published" datetime="<?php echo get_the_date('Y-m-d'); ?>" itemprop="datePublished" content="<?php echo get_the_date('Y-m-d'); ?>">
<?php echo get_the_date(); ?>
</time>
(last updated
<time class="updated" datetime="<?php echo get_the_modified_date('c'); ?>" itemprop="dateModified" content="<?php echo get_the_modified_date('c'); ?>">
<?php echo human_time_diff(get_the_modified_time('U'), current_time('U')); ?>
</time>
ago)
</span>
</small>
</div><!-- .entry-byline-dateline -->
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="https://www.steffanick.com/android-chrome-192x192.png">
<meta itemprop="width" content="192">
<meta itemprop="height" content="192">
</div>
<meta itemprop="name" content="Steffanick">
</div>
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content" itemprop="articleBody">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
</div><!-- .panel-body -->
<div class="panel-footer">
<footer class="entry-meta">
<?php twentytwelve_entry_meta(); ?>
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
<?php if ( is_singular() && get_the_author_meta( 'description' ) ) : // If a user has filled out their description show a bio on their entries. ?>
<hr />
<div class="author-info media">
<div class="author-avatar media-left">
<?php
/** This filter is documented in author.php */
$author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 64 );
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
?>
</div><!-- .author-avatar -->
<div class="author-description media-body">
<address>
<span class="media-heading">
<a href="<?php echo get_the_author_meta('url'); ?>" title="Visit <?php echo get_the_author(); ?>’s website">
<span><?php echo get_the_author(); ?></span>
</a>
</span>
</address>
<p><?php the_author_meta( 'description' ); ?></p>
</div><!-- .author-description -->
</div><!-- .author-info -->
<?php endif; ?>
</footer><!-- .entry-meta -->
</div><!-- .panel-footer -->
</div><!-- .panel -->
</article><!-- #post -->