Ticket #17748: twentyeleven.patch
File twentyeleven.patch, 15.0 KB (added by , 14 years ago) |
---|
-
archive.php
17 17 <section id="primary"> 18 18 <div id="content" role="main"> 19 19 20 <?php21 /* Queue the first post, that way we know22 * what date we're dealing with (if that is the case).23 *24 * We reset this later so we can run the loop25 * properly with a call to rewind_posts().26 */27 if ( have_posts() )28 the_post();29 ?>30 31 20 <header class="page-header"> 32 21 <h1 class="page-title"> 33 22 <?php if ( is_day() ) : ?> … … 42 31 </h1> 43 32 </header> 44 33 45 <?php46 /* Since we called the_post() above, we need to47 * rewind the loop back to the beginning that way48 * we can run the loop properly, in full.49 */50 rewind_posts();51 ?>52 53 34 <?php twentyeleven_content_nav( 'nav-above' ); ?> 54 35 55 36 <?php /* Start the Loop */ ?> -
author.php
14 14 15 15 <?php 16 16 /* Queue the first post, that way we know 17 * what datewe're dealing with (if that is the case).17 * what author we're dealing with (if that is the case). 18 18 * 19 19 * We reset this later so we can run the loop 20 20 * properly with a call to rewind_posts(). -
comments.php
35 35 ?> 36 36 </h2> 37 37 38 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>38 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through, WHY does the theme have to call get_option()? ?> 39 39 <nav id="comment-nav-above"> 40 40 <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1> 41 41 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyeleven' ) ); ?></div> -
content-aside.php
17 17 <h2 class="entry-format"><?php _e( 'Aside', 'twentyeleven' ); ?></h2> 18 18 </hgroup> 19 19 20 <?php if ( 'post' == $post->post_type) : ?>20 <?php if ( 'post' == get_post_type() ) : ?> 21 21 <?php endif; ?> 22 22 23 23 <?php if ( comments_open() ) : ?> -
content-gallery.php
40 40 <?php if ( post_password_required() ) : ?> 41 41 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> 42 42 43 44 45 46 47 48 49 50 43 <?php else : ?> 44 <?php 45 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 46 if ( $images ) : 47 $total_images = count( $images ); 48 $image = array_shift( $images ); 49 $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); 50 ?> 51 51 52 53 54 52 <figure class="gallery-thumb"> 53 <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 54 </figure><!-- .gallery-thumb --> 55 55 56 57 58 59 56 <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyeleven' ), 57 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 58 number_format_i18n( $total_images ) 59 ); ?></em></p> 60 60 <?php endif; ?> 61 61 <?php the_excerpt(); ?> 62 62 <?php endif; ?> -
content-image.php
29 29 </div><!-- .entry-content --> 30 30 31 31 <footer class="entry-meta"> 32 <?php if ( 'post' == $post->post_type) : // Hide category and tag text for pages on Search ?>32 <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> 33 33 <div class="entry-meta"> 34 34 <?php 35 35 printf( __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), … … 52 52 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?> 53 53 </span> 54 54 <?php endif; // End if categories ?> 55 <!-- What about <span class="sep"> | </span> as in the other content types? a few others lack this too --> 55 56 <?php 56 57 /* translators: used between list items, there is a space after the comma */ 57 58 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); -
content-link.php
17 17 <h2 class="entry-format"><?php _e( 'Link', 'twentyeleven' ); ?></h2> 18 18 </hgroup> 19 19 20 <?php if ( 'post' == $post->post_type) : ?>20 <?php if ( 'post' == get_post_type() ) : ?> 21 21 <?php endif; ?> 22 22 23 23 <?php if ( comments_open() ) : ?> -
content-quote.php
15 15 <h2 class="entry-format"><?php _e( 'Quote', 'twentyeleven' ); ?></h2> 16 16 </hgroup> 17 17 18 <?php if ( 'post' == $post->post_type) : ?>18 <?php if ( 'post' == get_post_type() ) : ?> 19 19 <div class="entry-meta"> 20 20 <?php 21 21 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), … … 50 50 51 51 <footer class="entry-meta"> 52 52 <?php $show_sep = false; ?> 53 <?php if ( 'post' == $post->post_type) : // Hide category and tag text for pages on Search ?>53 <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> 54 54 <?php 55 55 /* translators: used between list items, there is a space after the comma */ 56 56 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); -
content-single.php
12 12 <header class="entry-header"> 13 13 <h1 class="entry-title"><?php the_title(); ?></h1> 14 14 15 <?php if ( 'post' == get_post_type() ) : /* Bit of a disconnect here, Some files include this test, not all do. */ ?> 15 16 <div class="entry-meta"> 16 17 <?php 17 18 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), … … 24 25 ); 25 26 ?> 26 27 </div><!-- .entry-meta --> 28 <?php endif; ?> 27 29 </header><!-- .entry-header --> 28 30 29 31 <div class="entry-content"> -
content-status.php
15 15 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> 16 16 <h2 class="entry-format"><?php _e( 'Status', 'twentyeleven' ); ?></h2> 17 17 </hgroup> 18 19 <?php if ( 'post' == $post->post_type ) : ?>20 <?php endif; ?>21 18 22 19 <?php if ( comments_open() ) : ?> 23 20 <div class="comments-link"> … … 32 29 </div><!-- .entry-summary --> 33 30 <?php else : ?> 34 31 <div class="entry-content"> 35 <div class="avatar"><?php echo get_avatar( $post->post_author, apply_filters( 'twentyeleven_status_avatar', '65' ) ); ?></div>32 <div class="avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', '65' ) ); ?></div> 36 33 37 34 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> 38 35 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyeleven' ), 'after' => '</div>' ) ); ?> -
content.php
12 12 <header class="entry-header"> 13 13 <?php if ( is_sticky() ) : ?> 14 14 <hgroup> 15 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>15 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) /* Y NO ARRAY! */ ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> 16 16 <h2 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h2> 17 17 </hgroup> 18 18 <?php else : ?> 19 19 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> 20 20 <?php endif; ?> 21 21 22 <?php if ( 'post' == $post->post_type) : ?>22 <?php if ( 'post' == get_post_type() ) : ?> 23 23 <div class="entry-meta"> 24 24 <?php 25 25 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), … … 53 53 <?php endif; ?> 54 54 55 55 <footer class="entry-meta"> 56 <?php $show_sep = false; ?>57 <?php if ( 'post' == $post->post_type) : // Hide category and tag text for pages on Search ?>56 <?php $show_sep = false; // perhaps a implode(' | ', $utilities) could be used instead of this $show_sep business? ?> 57 <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> 58 58 <?php 59 59 /* translators: used between list items, there is a space after the comma */ 60 60 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); … … 77 77 $show_sep = true; ?> 78 78 </span> 79 79 <?php endif; // End if $tags_list ?> 80 <?php endif; // End if 'post' == $post->post_type?>80 <?php endif; // End if 'post' == get_post_type() ?> 81 81 82 82 <?php if ( comments_open() ) : ?> 83 83 <?php if ( $show_sep ) : ?> -
image.php
91 91 </div><!-- .entry-content --> 92 92 93 93 <footer class="entry-meta"> 94 <!-- How come Images get this verbose Trackbacks vs. Comments text nothing else has anything like it? Trackbacks are so last century as well --> 94 95 <?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?> 95 96 <?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyeleven' ), get_trackback_url() ); ?> 96 97 <?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?> -
inc/theme-options.php
14 14 * 15 15 * @since Twenty Eleven 1.0 16 16 * 17 * @param string $hook_suffix The action passes the current page to the function. We don't18 * do anything if we're not on our theme options page.19 17 */ 20 18 function twentyeleven_admin_enqueue_scripts( $hook_suffix ) { 21 if ( $hook_suffix != 'appearance_page_theme_options' )22 return;23 24 19 wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' ); 25 20 wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-04-28' ); 26 21 wp_enqueue_style( 'farbtastic' ); 27 22 } 28 add_action( 'admin_ enqueue_scripts', 'twentyeleven_admin_enqueue_scripts' );23 add_action( 'admin_print_styles-appearance_page_theme_options', 'twentyeleven_admin_enqueue_scripts' ); 29 24 30 25 /** 31 26 * Register the form setting for our twentyeleven_options array. … … 309 304 310 305 // Link color must be 3 or 6 hexadecimal characters 311 306 if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) 312 307 $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) ); 313 308 314 309 // Theme layout must be in our array of theme layout options 315 310 if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) ) -
single.php
12 12 <div id="primary"> 13 13 <div id="content" role="main"> 14 14 15 <?php if ( have_posts() )while ( have_posts() ) : the_post(); ?>15 <?php while ( have_posts() ) : the_post(); ?> 16 16 17 17 <nav id="nav-single"> 18 18 <h1 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h1>