Permalink
Browse files

Updated to match T12 version 1.1.1, released with WP 3.5

  • Loading branch information...
1 parent 4709b21 commit 27a13967186d0f7514ea870047e5d5936e10b260 @jlyman committed Dec 11, 2012
Showing with 60 additions and 12 deletions.
  1. +5 −0 content-aside.php
  2. +7 −2 content-image.php
  3. +5 −0 content-link.php
  4. +5 −0 content-quote.php
  5. +5 −0 content-status.php
  6. +1 −1 footer.php
  7. +24 −4 functions.php
  8. +5 −2 header.php
  9. +1 −1 image.php
  10. +2 −2 style.css
View
5 content-aside.php
@@ -18,6 +18,11 @@
<footer class="entry-meta">
<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>
+ <?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 edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->
View
9 content-image.php
@@ -16,8 +16,13 @@
<footer class="entry-meta">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark" itemprop="url">
<h1><?php the_title(); ?></h1>
- <h2><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>" pubdate itemprop="datePublished"><?php echo get_the_date(); ?></time></h2>
- <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
+ <h2><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>" itemprop="datePublished"><?php echo get_the_date(); ?></time></h2>
</a>
+ <?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 edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->
View
5 content-link.php
@@ -16,6 +16,11 @@
<footer class="entry-meta">
<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>
+ <?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 edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->
View
5 content-quote.php
@@ -15,6 +15,11 @@
<footer class="entry-meta">
<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>
+ <?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 edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->
View
5 content-status.php
@@ -22,6 +22,11 @@
</div><!-- .entry-content -->
<footer class="entry-meta">
+ <?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 edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->
View
2 footer.php
@@ -32,7 +32,7 @@
<div class="site-info">
<?php do_action( 'twentytwelve_credits' ); ?>
- <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a>
+ <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
View
28 functions.php
@@ -77,7 +77,7 @@ function twentytwelve_comment( $comment, $args, $depth ) {
// If current post author is also comment author, make it known visually.
( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''
);
- printf( '<a href="%1$s"><time pubdate datetime="%2$s" itemprop="commentTime">%3$s</time></a>',
+ printf( '<a href="%1$s"><time datetime="%2$s" itemprop="commentTime">%3$s</time></a>',
esc_url( get_comment_link( $comment->comment_ID ) ),
get_comment_time( 'c' ),
/* translators: 1: date, 2: time */
@@ -96,7 +96,7 @@ function twentytwelve_comment( $comment, $args, $depth ) {
</section><!-- .comment-content -->
<div class="reply">
- <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentytwelve' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
+ <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</div><!-- .reply -->
</article><!-- #comment-## -->
<?php
@@ -120,7 +120,7 @@ function twentytwelve_entry_meta() {
// Translators: used between list items, there is a space after the comma.
$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
- $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>',
+ $date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" itemprop="datePublished">%4$s</time></a>',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
@@ -165,4 +165,24 @@ function twentytwelve_comment_author_hook( $author_code ) {
return '<p class="comment-author-name" itemprop="name">' . $author_code . '</p>'; // Can't use a span tag because of conflicting styles on .bypostauthor
}
add_filter('get_comment_author_link', 'twentytwelve_comment_author_hook');
-endif;
+endif;
+
+if ( ! function_exists( 'twentytwelve_allow_schema_markup' ) ) :
+/**
+ * Allows Schema.org attributes to be added to HTML tags in the editor (but not for comments).
+ *
+ * @since Twenty Twelve 1.0
+ */
+function twenty_twelve_allow_schema_markup() {
+ global $allowedposttags;
+ foreach( $allowedposttags as $tag => $attr ) {
+ $attr[ 'itemscope' ] = array();
+ $attr[ 'itemtype' ] = array();
+ $attr[ 'itemprop' ] = array();
+ $allowedposttags[ $tag ] = $attr;
+ }
+ return $allowedposttags;
+}
+
+add_action( 'init', 'twentytwelve_allow_schema_markup' );
+endif;
View
7 header.php
@@ -9,9 +9,12 @@
* @since Twenty Twelve 1.0
*/
?><!DOCTYPE html>
-<!--[if IE 7 | IE 8]>
+<!--[if IE 7]>
<html class="ie" <?php language_attributes(); ?>>
<![endif]-->
+<!--[if IE 8]>
+<html class="ie ie8" <?php language_attributes(); ?>>
+<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
@@ -38,7 +41,7 @@
<nav id="site-navigation" class="main-navigation" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
- <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>
+ <a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
</nav><!-- #site-navigation -->
View
2 image.php
@@ -23,7 +23,7 @@
<footer class="entry-meta">
<?php
$metadata = wp_get_attachment_metadata();
- 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' ),
+ 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' ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( wp_get_attachment_url() ),
View
4 style.css
@@ -5,7 +5,7 @@ Author: Joshua Lyman
Author URI: http://www.joshualyman.com
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.
Template: twentytwelve
-Version: 1.0
+Version: 1.1.1
License: GNU General Public License
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
*/
@@ -46,4 +46,4 @@ p.comment-author-name,
#footer-widgets.three .widget + .widget + .widget {
margin-right: 0;
}
-}
+}

0 comments on commit 27a1396

Please sign in to comment.