Ticket #25256: twentyeleven.2.diff
File twentyeleven.2.diff, 12.9 KB (added by , 12 years ago) |
---|
-
src/wp-content/themes/twentyeleven/author.php
15 15 <?php if ( have_posts() ) : ?> 16 16 17 17 <?php 18 /** 19 * Queue the first post, that way we know what author 18 /* Queue the first post, that way we know what author 20 19 * we're dealing with (if that is the case). 21 20 * 22 21 * We reset this later so we can run the loop properly … … 30 29 </header> 31 30 32 31 <?php 33 /** 34 * Since we called the_post() above, we need to 32 /* Since we called the_post() above, we need to 35 33 * rewind the loop back to the beginning that way 36 34 * we can run the loop properly, in full. 37 35 */ … … 67 65 <?php while ( have_posts() ) : the_post(); ?> 68 66 69 67 <?php 70 /** 71 * Include the Post-Format-specific template for the content. 68 /* Include the Post-Format-specific template for the content. 72 69 * If you want to overload this in a child theme then include a file 73 70 * called content-___.php (where ___ is the Post Format name) and that will be used instead. 74 71 */ -
src/wp-content/themes/twentyeleven/category.php
40 40 <?php while ( have_posts() ) : the_post(); ?> 41 41 42 42 <?php 43 /** 44 * Include the Post-Format-specific template for the content. 43 /* Include the Post-Format-specific template for the content. 45 44 * If you want to overload this in a child theme then include a file 46 45 * called content-___.php (where ___ is the Post Format name) and that will be used instead. 47 46 */ -
src/wp-content/themes/twentyeleven/comments.php
17 17 <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></p> 18 18 </div><!-- #comments --> 19 19 <?php 20 /** 21 * Stop the rest of comments.php from being processed, 20 /* Stop the rest of comments.php from being processed, 22 21 * but don't kill the script entirely -- we still have 23 22 * to fully load the template. 24 23 */ … … 46 45 47 46 <ol class="commentlist"> 48 47 <?php 49 /** 50 * Loop through and list the comments. Tell wp_list_comments() 48 /* Loop through and list the comments. Tell wp_list_comments() 51 49 * to use twentyeleven_comment() to format the comments. 52 50 * If you want to overload this in a child theme then you can 53 51 * define twentyeleven_comment() and that will be used instead. … … 66 64 <?php endif; // check for comment navigation ?> 67 65 68 66 <?php 69 /** 70 * If there are no comments and comments are closed, let's leave a little note, shall we? 67 /* If there are no comments and comments are closed, let's leave a little note, shall we? 71 68 * But we only want the note on posts and pages that had comments in the first place. 72 69 */ 73 70 if ( ! comments_open() && get_comments_number() ) : ?> -
src/wp-content/themes/twentyeleven/footer.php
15 15 <footer id="colophon" role="contentinfo"> 16 16 17 17 <?php 18 /** 19 * A sidebar in the footer? Yep. You can can customize 18 /* A sidebar in the footer? Yep. You can can customize 20 19 * your footer with three columns of widgets. 21 20 */ 22 21 if ( ! is_404() ) -
src/wp-content/themes/twentyeleven/functions.php
38 38 * @since Twenty Eleven 1.0 39 39 */ 40 40 41 /** 42 * Set the content width based on the theme's design and stylesheet. 43 */ 41 // Set the content width based on the theme's design and stylesheet. 44 42 if ( ! isset( $content_width ) ) 45 43 $content_width = 584; 46 44 47 /** 48 * Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run. 49 */ 45 // Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run. 50 46 add_action( 'after_setup_theme', 'twentyeleven_setup' ); 51 47 52 48 if ( ! function_exists( 'twentyeleven_setup' ) ): … … 72 68 */ 73 69 function twentyeleven_setup() { 74 70 75 /** 76 * Make Twenty Eleven available for translation. 71 /* Make Twenty Eleven available for translation. 77 72 * Translations can be added to the /languages/ directory. 78 73 * If you're building a theme based on Twenty Eleven, use 79 74 * a find and replace to change 'twentyeleven' to the name … … 107 102 108 103 // Add support for custom backgrounds. 109 104 add_theme_support( 'custom-background', array( 110 /** 111 * Let WordPress know what our default background color is. 105 /* Let WordPress know what our default background color is. 112 106 * This is dependent on our current color scheme. 113 107 */ 114 108 'default-color' => $default_background_color, … … 162 156 add_custom_background(); 163 157 } 164 158 165 /** 166 * We'll be using post thumbnails for custom header images on posts and pages. 159 /* We'll be using post thumbnails for custom header images on posts and pages. 167 160 * We want them to be the size of the header image that we just defined. 168 161 * Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. 169 162 */ 170 163 set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true ); 171 164 172 /** 173 * Add Twenty Eleven's custom image sizes. 165 /* Add Twenty Eleven's custom image sizes. 174 166 * Used for large feature (header) images. 175 167 */ 176 168 add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true ); -
src/wp-content/themes/twentyeleven/header.php
25 25 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 26 26 <meta name="viewport" content="width=device-width" /> 27 27 <title><?php 28 /** 29 * Print the <title> tag based on what is being viewed. 30 */ 28 // Print the <title> tag based on what is being viewed. 31 29 global $page, $paged; 32 30 33 31 wp_title( '|', true, 'right' ); … … 52 50 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script> 53 51 <![endif]--> 54 52 <?php 55 /** 56 * We add some JavaScript to pages with the comment form 53 /* We add some JavaScript to pages with the comment form 57 54 * to support sites with threaded comments (when in use). 58 55 */ 59 56 if ( is_singular() && get_option( 'thread_comments' ) ) 60 57 wp_enqueue_script( 'comment-reply' ); 61 58 62 /** 63 * Always have wp_head() just before the closing </head> 59 /* Always have wp_head() just before the closing </head> 64 60 * tag of your theme, or you will break many plugins, which 65 61 * generally use this hook to add elements to <head> such 66 62 * as styles, scripts, and meta tags. … … 83 79 if ( $header_image ) : 84 80 // Compatibility with versions of WordPress prior to 3.4. 85 81 if ( function_exists( 'get_custom_header' ) ) { 86 /** 87 * We need to figure out what the minimum width should be for our featured image. 82 /* We need to figure out what the minimum width should be for our featured image. 88 83 * This result would be the suggested width if the theme were to implement flexible widths. 89 84 */ 90 85 $header_image_width = get_theme_support( 'custom-header', 'width' ); … … 94 89 ?> 95 90 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> 96 91 <?php 97 /** 98 * The header image. 92 /* The header image. 99 93 * Check if this is a post or page, if it has a thumbnail, and if it's a big one 100 94 */ 101 95 if ( is_singular() && has_post_thumbnail( $post->ID ) && -
src/wp-content/themes/twentyeleven/image.php
48 48 <div class="entry-attachment"> 49 49 <div class="attachment"> 50 50 <?php 51 /** 52 * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, 51 /* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, 53 52 * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file 54 53 */ 55 54 $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); -
src/wp-content/themes/twentyeleven/search.php
24 24 <?php while ( have_posts() ) : the_post(); ?> 25 25 26 26 <?php 27 /** 28 * Include the Post-Format-specific template for the content. 27 /* Include the Post-Format-specific template for the content. 29 28 * If you want to overload this in a child theme then include a file 30 29 * called content-___.php (where ___ is the Post Format name) and that 31 30 * will be used instead. -
src/wp-content/themes/twentyeleven/showcase.php
26 26 <?php while ( have_posts() ) : the_post(); ?> 27 27 28 28 <?php 29 /** 30 * We are using a heading by rendering the_content 29 /* We are using a heading by rendering the_content 31 30 * If we have content for this page, let's display it. 32 31 */ 33 32 if ( '' != get_the_content() ) … … 37 36 <?php endwhile; ?> 38 37 39 38 <?php 40 /** 41 * Begin the featured posts section. 39 /* Begin the featured posts section. 42 40 * 43 41 * See if we have any sticky posts and use them to create our featured posts. 44 42 * We limit the featured posts at ten. … … 61 59 // Proceed only if published posts exist 62 60 if ( $featured->have_posts() ) : 63 61 64 /** 65 * We will need to count featured posts starting from zero 62 /* We will need to count featured posts starting from zero 66 63 * to create the slider navigation. 67 64 */ 68 65 $counter_slider = 0; … … 84 81 // Increase the counter. 85 82 $counter_slider++; 86 83 87 /** 88 * We're going to add a class to our featured post for featured images 84 /* We're going to add a class to our featured post for featured images 89 85 * by default it'll have the feature-text class. 90 86 */ 91 87 $feature_class = 'feature-text'; … … 108 104 <section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>"> 109 105 110 106 <?php 111 /** 112 * If the thumbnail is as big as the header image 107 /* If the thumbnail is as big as the header image 113 108 * make it a large featured post, otherwise render it small 114 109 */ 115 110 if ( has_post_thumbnail() ) { -
src/wp-content/themes/twentyeleven/sidebar-footer.php
9 9 ?> 10 10 11 11 <?php 12 /** 13 * The footer widget area is triggered if any of the areas 12 /* The footer widget area is triggered if any of the areas 14 13 * have widgets. So let's check that first. 15 14 * 16 15 * If none of the sidebars have widgets, then let's bail early. -
src/wp-content/themes/twentyeleven/tag.php
40 40 <?php while ( have_posts() ) : the_post(); ?> 41 41 42 42 <?php 43 /** 44 * Include the Post-Format-specific template for the content. 43 /* Include the Post-Format-specific template for the content. 45 44 * If you want to overload this in a child theme then include a file 46 45 * called content-___.php (where ___ is the Post Format name) and that 47 46 * will be used instead.