Skip to content
This repository
Browse code

Updated to match T12 version 1.1.1, released with WP 3.5

  • Loading branch information...
commit 27a13967186d0f7514ea870047e5d5936e10b260 1 parent 4709b21
Joshua Lyman authored December 11, 2012
5  content-aside.php
@@ -18,6 +18,11 @@
18 18
 
19 19
 		<footer class="entry-meta">
20 20
 			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark" itemprop="url"><?php echo get_the_date(); ?></a>
  21
+			<?php if ( comments_open() ) : ?>
  22
+			<div class="comments-link">
  23
+				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
  24
+			</div><!-- .comments-link -->
  25
+			<?php endif; // comments_open() ?>
21 26
 			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
22 27
 		</footer><!-- .entry-meta -->
23 28
 	</article><!-- #post -->
9  content-image.php
@@ -16,8 +16,13 @@
16 16
 		<footer class="entry-meta">
17 17
 			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark" itemprop="url">
18 18
 				<h1><?php the_title(); ?></h1>
19  
-				<h2><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>" pubdate itemprop="datePublished"><?php echo get_the_date(); ?></time></h2>
20  
-				<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
  19
+				<h2><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>" itemprop="datePublished"><?php echo get_the_date(); ?></time></h2>
21 20
 			</a>
  21
+			<?php if ( comments_open() ) : ?>
  22
+			<div class="comments-link">
  23
+				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
  24
+			</div><!-- .comments-link -->
  25
+			<?php endif; // comments_open() ?>
  26
+			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
22 27
 		</footer><!-- .entry-meta -->
23 28
 	</article><!-- #post -->
5  content-link.php
@@ -16,6 +16,11 @@
5  content-quote.php
@@ -15,6 +15,11 @@
15 15
 
16 16
 		<footer class="entry-meta">
17 17
 			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark" itemprop="url"><?php echo get_the_date(); ?></a>
  18
+			<?php if ( comments_open() ) : ?>
  19
+			<div class="comments-link">
  20
+				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
  21
+			</div><!-- .comments-link -->
  22
+			<?php endif; // comments_open() ?>
18 23
 			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
19 24
 		</footer><!-- .entry-meta -->
20 25
 	</article><!-- #post -->
5  content-status.php
@@ -22,6 +22,11 @@
22 22
 		</div><!-- .entry-content -->
23 23
 
24 24
 		<footer class="entry-meta">
  25
+			<?php if ( comments_open() ) : ?>
  26
+			<div class="comments-link">
  27
+				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
  28
+			</div><!-- .comments-link -->
  29
+			<?php endif; // comments_open() ?>
25 30
 			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
26 31
 		</footer><!-- .entry-meta -->
27 32
 	</article><!-- #post -->
2  footer.php
@@ -32,7 +32,7 @@
28  functions.php
@@ -77,7 +77,7 @@ function twentytwelve_comment( $comment, $args, $depth ) {
77 77
 						// If current post author is also comment author, make it known visually.
78 78
 						( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''
79 79
 					);
80  
-					printf( '<a href="%1$s"><time pubdate datetime="%2$s" itemprop="commentTime">%3$s</time></a>',
  80
+					printf( '<a href="%1$s"><time datetime="%2$s" itemprop="commentTime">%3$s</time></a>',
81 81
 						esc_url( get_comment_link( $comment->comment_ID ) ),
82 82
 						get_comment_time( 'c' ),
83 83
 						/* translators: 1: date, 2: time */
@@ -96,7 +96,7 @@ function twentytwelve_comment( $comment, $args, $depth ) {
96 96
 			</section><!-- .comment-content -->
97 97
 
98 98
 			<div class="reply">
99  
-				<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentytwelve' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  99
+				<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
100 100
 			</div><!-- .reply -->
101 101
 		</article><!-- #comment-## -->
102 102
 	<?php
@@ -120,7 +120,7 @@ function twentytwelve_entry_meta() {
120 120
 	// Translators: used between list items, there is a space after the comma.
121 121
 	$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
122 122
 
123  
-	$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate itemprop="datePublished">%4$s</time></a>',
  123
+	$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" itemprop="datePublished">%4$s</time></a>',
124 124
 		esc_url( get_permalink() ),
125 125
 		esc_attr( get_the_time() ),
126 126
 		esc_attr( get_the_date( 'c' ) ),
@@ -165,4 +165,24 @@ function twentytwelve_comment_author_hook( $author_code ) {
165 165
 	return '<p class="comment-author-name" itemprop="name">' . $author_code . '</p>'; // Can't use a span tag because of conflicting styles on .bypostauthor
166 166
 }
167 167
 add_filter('get_comment_author_link', 'twentytwelve_comment_author_hook');
168  
-endif;
  168
+endif;
  169
+
  170
+if ( ! function_exists( 'twentytwelve_allow_schema_markup' ) ) :
  171
+/**
  172
+ * Allows Schema.org attributes to be added to HTML tags in the editor (but not for comments).
  173
+ *
  174
+ * @since Twenty Twelve 1.0
  175
+ */
  176
+function twenty_twelve_allow_schema_markup() {
  177
+	global $allowedposttags;
  178
+	foreach( $allowedposttags as $tag => $attr ) {
  179
+		$attr[ 'itemscope' ] = array();
  180
+		$attr[ 'itemtype' ] = array();
  181
+		$attr[ 'itemprop' ] = array();
  182
+		$allowedposttags[ $tag ] = $attr;
  183
+	}
  184
+	return $allowedposttags;
  185
+}
  186
+
  187
+add_action( 'init', 'twentytwelve_allow_schema_markup' );
  188
+endif;
7  header.php
@@ -9,9 +9,12 @@
9 9
  * @since Twenty Twelve 1.0
10 10
  */
11 11
 ?><!DOCTYPE html>
12  
-<!--[if IE 7 | IE 8]>
  12
+<!--[if IE 7]>
13 13
 <html class="ie" <?php language_attributes(); ?>>
14 14
 <![endif]-->
  15
+<!--[if IE 8]>
  16
+<html class="ie ie8" <?php language_attributes(); ?>>
  17
+<![endif]-->
15 18
 <!--[if !(IE 7) | !(IE 8)  ]><!-->
16 19
 <html <?php language_attributes(); ?>>
17 20
 <!--<![endif]-->
@@ -38,7 +41,7 @@
38 41
 
39 42
 		<nav id="site-navigation" class="main-navigation" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
40 43
 			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
41  
-			<div class="skip-link assistive-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a></div>
  44
+			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
42 45
 			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
43 46
 		</nav><!-- #site-navigation -->
44 47
 
2  image.php
@@ -23,7 +23,7 @@
23 23
 						<footer class="entry-meta">
24 24
 							<?php
25 25
 								$metadata = wp_get_attachment_metadata();
26  
-								printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date" itemprop="datePublished"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image" itemprop="contentUrl">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'twentytwelve' ),
  26
+								printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date" itemprop="datePublished"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image" itemprop="contentUrl">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'twentytwelve' ),
27 27
 									esc_attr( get_the_date( 'c' ) ),
28 28
 									esc_html( get_the_date() ),
29 29
 									esc_url( wp_get_attachment_url() ),
4  style.css
@@ -5,7 +5,7 @@ Author: Joshua Lyman
5 5
 Author URI: http://www.joshualyman.com
6 6
 Description: Take the beauty of the original Twenty Twelve theme and add on powerful microdata markup with the Schema.org conventions. Improve search engine parsing and contribute to machine readable data everywhere.
7 7
 Template: twentytwelve
8  
-Version: 1.0
  8
+Version: 1.1.1
9 9
 License: GNU General Public License
10 10
 Tags: microformats, dark, light, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-width, flexible-width, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
11 11
 */
@@ -46,4 +46,4 @@ p.comment-author-name,
46 46
 	#footer-widgets.three .widget + .widget + .widget {
47 47
 		margin-right: 0;
48 48
 	}
49  
-}
  49
+}

0 notes on commit 27a1396

Please sign in to comment.
Something went wrong with that request. Please try again.