Changeset 45581
- Timestamp:
- 07/01/2019 08:22:31 AM (5 years ago)
- Location:
- trunk/src/wp-content/themes
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/header.php
r45218 r45581 103 103 * Check if this is a post or page, if it has a thumbnail, and if it's a big one 104 104 */ 105 if ( is_singular() && has_post_thumbnail( $post->ID ) && 106 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) && 107 $image[1] >= $header_image_width ) : 108 // Houston, we have a new header image! 109 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 110 else : 105 if ( is_singular() && has_post_thumbnail( $post->ID ) ) { 106 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ); 107 if ( $image && $image[1] >= $header_image_width ) { 108 // Houston, we have a new header image! 109 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 110 } 111 } else { 111 112 // Compatibility with versions of WordPress prior to 3.4. 112 113 if ( function_exists( 'get_custom_header' ) ) { … … 119 120 ?> 120 121 <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /> 121 <?php endif; // end check for featured image or standard header ?> 122 <?php 123 } // end check for featured image or standard header 124 ?> 122 125 </a> 123 126 <?php endif; // end check for removed header image ?> -
trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php
r45218 r45581 366 366 */ 367 367 function twentyeleven_theme_options_validate( $input ) { 368 $output = $defaults = twentyeleven_get_default_theme_options(); 368 $defaults = twentyeleven_get_default_theme_options(); 369 $output = $defaults; 369 370 370 371 // Color scheme must be in our array of color scheme options … … 374 375 375 376 // Our defaults for the link color may have changed, based on the color scheme. 376 $output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] ); 377 $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] ); 378 $output['link_color'] = $defaults['link_color']; 377 379 378 380 // Link color must be 3 or 6 hexadecimal characters -
trunk/src/wp-content/themes/twentyeleven/inc/widgets.php
r44569 r45581 77 77 } 78 78 79 if ( ! $args['number'] = absint( $instance['number'] ) ) { 79 $args['number'] = absint( $instance['number'] ); 80 if ( ! $args['number'] ) { 80 81 $args['number'] = 10; 81 82 } -
trunk/src/wp-content/themes/twentyfifteen/inc/template-tags.php
r45256 r45581 24 24 <div class="nav-links"> 25 25 <?php 26 if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) : 26 $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ); 27 if ( $prev_link ) { 27 28 printf( '<div class="nav-previous">%s</div>', $prev_link ); 28 endif; 29 30 if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) : 29 } 30 31 $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ); 32 if ( $next_link ) { 31 33 printf( '<div class="nav-next">%s</div>', $next_link ); 32 endif;34 } 33 35 ?> 34 36 </div><!-- .nav-links --> … … 142 144 */ 143 145 function twentyfifteen_categorized_blog() { 144 if ( false === ( $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ) ) ) { 146 $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ); 147 if ( false === $all_the_cool_cats ) { 145 148 // Create an array of all the categories that are attached to posts. 146 149 $all_the_cool_cats = get_categories( -
trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php
r45256 r45581 132 132 */ 133 133 function twentyfourteen_categorized_blog() { 134 if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) { 134 $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ); 135 if ( false === $all_the_cool_cats ) { 135 136 // Create an array of all the categories that are attached to posts 136 137 $all_the_cool_cats = get_categories( -
trunk/src/wp-content/themes/twentysixteen/inc/template-tags.php
r45256 r45581 210 210 */ 211 211 function twentysixteen_categorized_blog() { 212 if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) { 212 $all_the_cool_cats = get_transient( 'twentysixteen_categories' ); 213 if ( false === $all_the_cool_cats ) { 213 214 // Create an array of all the categories that are attached to posts. 214 215 $all_the_cool_cats = get_categories( -
trunk/src/wp-content/themes/twentyten/header.php
r45218 r45581 86 86 } 87 87 88 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 89 if ( is_singular() && current_theme_supports( 'post-thumbnails' ) && 90 has_post_thumbnail( $post->ID ) && 91 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) && 92 $image[1] >= $header_image_width ) : 93 // Houston, we have a new header image! 94 echo get_the_post_thumbnail( $post->ID ); 95 elseif ( get_header_image() ) : 96 // Compatibility with versions of WordPress prior to 3.4. 97 if ( function_exists( 'get_custom_header' ) ) { 98 $header_image_width = get_custom_header()->width; 99 $header_image_height = get_custom_header()->height; 100 } else { 101 $header_image_width = HEADER_IMAGE_WIDTH; 102 $header_image_height = HEADER_IMAGE_HEIGHT; 103 } 104 ?> 105 <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="" /> 106 <?php endif; ?> 88 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 89 if ( is_singular() && has_post_thumbnail( $post->ID ) ) { 90 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ); 91 if ( $image && $image[1] >= $header_image_width ) { 92 // Houston, we have a new header image! 93 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 94 } 95 } else { 96 // Compatibility with versions of WordPress prior to 3.4. 97 if ( function_exists( 'get_custom_header' ) ) { 98 $header_image_width = get_custom_header()->width; 99 $header_image_height = get_custom_header()->height; 100 } else { 101 $header_image_width = HEADER_IMAGE_WIDTH; 102 $header_image_height = HEADER_IMAGE_HEIGHT; 103 } 104 ?> 105 <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="" /> 106 <?php 107 } // end check for featured image or standard header 108 ?> 107 109 </div><!-- #branding --> 108 110 -
trunk/src/wp-content/themes/twentyten/loop.php
r45209 r45581 99 99 100 100 <div class="entry-utility"> 101 <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?> 101 <?php 102 $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ); 103 if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : 104 ?> 102 105 <a href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> 103 106 <span class="meta-sep">|</span> 104 <?php elseif ( $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' )&& in_category( $gallery->term_id ) ) : ?>107 <?php elseif ( $gallery && in_category( $gallery->term_id ) ) : ?> 105 108 <a href="<?php echo esc_url( get_category_link( $gallery ) ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> 106 109 <span class="meta-sep">|</span>
Note: See TracChangeset
for help on using the changeset viewer.