diff --git a/src/wp-content/themes/twentyeleven/header.php b/src/wp-content/themes/twentyeleven/header.php
index 39cbe89c11..1016b6be9f 100644
--- a/src/wp-content/themes/twentyeleven/header.php
+++ b/src/wp-content/themes/twentyeleven/header.php
@@ -102,12 +102,13 @@ if ( is_singular() && get_option( 'thread_comments' ) ) {
* The header image.
* Check if this is a post or page, if it has a thumbnail, and if it's a big one
*/
- if ( is_singular() && has_post_thumbnail( $post->ID ) &&
- ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&
- $image[1] >= $header_image_width ) :
- // Houston, we have a new header image!
- echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
- else :
+ if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
+ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );
+ if ( $image && $image[1] >= $header_image_width ) {
+ // Houston, we have a new header image!
+ echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
+ }
+ } else {
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
$header_image_width = get_custom_header()->width;
@@ -118,7 +119,9 @@ if ( is_singular() && get_option( 'thread_comments' ) ) {
}
?>
-
+
diff --git a/src/wp-content/themes/twentyeleven/inc/theme-options.php b/src/wp-content/themes/twentyeleven/inc/theme-options.php
index fb2ff32ad0..1a30475442 100644
--- a/src/wp-content/themes/twentyeleven/inc/theme-options.php
+++ b/src/wp-content/themes/twentyeleven/inc/theme-options.php
@@ -365,7 +365,8 @@ function twentyeleven_theme_options_render_page() {
* @param array $input An array of form input.
*/
function twentyeleven_theme_options_validate( $input ) {
- $output = $defaults = twentyeleven_get_default_theme_options();
+ $defaults = twentyeleven_get_default_theme_options();
+ $output = $defaults;
// Color scheme must be in our array of color scheme options
if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) ) {
@@ -373,7 +374,8 @@ function twentyeleven_theme_options_validate( $input ) {
}
// Our defaults for the link color may have changed, based on the color scheme.
- $output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] );
+ $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] );
+ $output['link_color'] = $defaults['link_color'];
// Link color must be 3 or 6 hexadecimal characters
if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) {
diff --git a/src/wp-content/themes/twentyeleven/inc/widgets.php b/src/wp-content/themes/twentyeleven/inc/widgets.php
index 2a0cdb4f51..137d37c0bd 100644
--- a/src/wp-content/themes/twentyeleven/inc/widgets.php
+++ b/src/wp-content/themes/twentyeleven/inc/widgets.php
@@ -76,7 +76,8 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
$instance['number'] = '10';
}
- if ( ! $args['number'] = absint( $instance['number'] ) ) {
+ $args['number'] = absint( $instance['number'] );
+ if ( ! $args['number'] ) {
$args['number'] = 10;
}
diff --git a/src/wp-content/themes/twentyfifteen/inc/template-tags.php b/src/wp-content/themes/twentyfifteen/inc/template-tags.php
index 6af6e750fd..4fdc8bff9e 100644
--- a/src/wp-content/themes/twentyfifteen/inc/template-tags.php
+++ b/src/wp-content/themes/twentyfifteen/inc/template-tags.php
@@ -23,13 +23,15 @@ if ( ! function_exists( 'twentyfifteen_comment_nav' ) ) :
%s
', $prev_link );
- endif;
+ }
- if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
+ $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) );
+ if ( $next_link ) {
printf( '%s
', $next_link );
- endif;
+ }
?>
@@ -141,7 +143,8 @@ endif;
* @return bool True of there is more than one category, false otherwise.
*/
function twentyfifteen_categorized_blog() {
- if ( false === ( $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ) ) ) {
+ $all_the_cool_cats = get_transient( 'twentyfifteen_categories' );
+ if ( false === $all_the_cool_cats ) {
// Create an array of all the categories that are attached to posts.
$all_the_cool_cats = get_categories(
array(
diff --git a/src/wp-content/themes/twentyfourteen/inc/template-tags.php b/src/wp-content/themes/twentyfourteen/inc/template-tags.php
index f1e952943b..35e35d77e9 100644
--- a/src/wp-content/themes/twentyfourteen/inc/template-tags.php
+++ b/src/wp-content/themes/twentyfourteen/inc/template-tags.php
@@ -131,7 +131,8 @@ endif;
* @return boolean true if blog has more than 1 category
*/
function twentyfourteen_categorized_blog() {
- if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) {
+ $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' );
+ if ( false === $all_the_cool_cats ) {
// Create an array of all the categories that are attached to posts
$all_the_cool_cats = get_categories(
array(
diff --git a/src/wp-content/themes/twentysixteen/inc/template-tags.php b/src/wp-content/themes/twentysixteen/inc/template-tags.php
index 55578bead0..6c500d432f 100644
--- a/src/wp-content/themes/twentysixteen/inc/template-tags.php
+++ b/src/wp-content/themes/twentysixteen/inc/template-tags.php
@@ -209,7 +209,8 @@ if ( ! function_exists( 'twentysixteen_categorized_blog' ) ) :
* @return bool True if there is more than one category, false otherwise.
*/
function twentysixteen_categorized_blog() {
- if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) {
+ $all_the_cool_cats = get_transient( 'twentysixteen_categories' );
+ if ( false === $all_the_cool_cats ) {
// Create an array of all the categories that are attached to posts.
$all_the_cool_cats = get_categories(
array(
diff --git a/src/wp-content/themes/twentyten/header.php b/src/wp-content/themes/twentyten/header.php
index 23a186340a..10d6f50fe7 100644
--- a/src/wp-content/themes/twentyten/header.php
+++ b/src/wp-content/themes/twentyten/header.php
@@ -85,25 +85,27 @@ if ( is_singular() && get_option( 'thread_comments' ) ) {
$header_image_width = HEADER_IMAGE_WIDTH;
}
- // Check if this is a post or page, if it has a thumbnail, and if it's a big one
- if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
- has_post_thumbnail( $post->ID ) &&
- ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
- $image[1] >= $header_image_width ) :
- // Houston, we have a new header image!
- echo get_the_post_thumbnail( $post->ID );
- elseif ( get_header_image() ) :
- // Compatibility with versions of WordPress prior to 3.4.
- if ( function_exists( 'get_custom_header' ) ) {
- $header_image_width = get_custom_header()->width;
- $header_image_height = get_custom_header()->height;
- } else {
- $header_image_width = HEADER_IMAGE_WIDTH;
- $header_image_height = HEADER_IMAGE_HEIGHT;
- }
- ?>
-
-
+ // Check if this is a post or page, if it has a thumbnail, and if it's a big one
+ if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
+ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );
+ if ( $image && $image[1] >= $header_image_width ) {
+ // Houston, we have a new header image!
+ echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
+ }
+ } else {
+ // Compatibility with versions of WordPress prior to 3.4.
+ if ( function_exists( 'get_custom_header' ) ) {
+ $header_image_width = get_custom_header()->width;
+ $header_image_height = get_custom_header()->height;
+ } else {
+ $header_image_width = HEADER_IMAGE_WIDTH;
+ $header_image_height = HEADER_IMAGE_HEIGHT;
+ }
+ ?>
+
+
diff --git a/src/wp-content/themes/twentyten/loop.php b/src/wp-content/themes/twentyten/loop.php
index 8b205a804b..e93de492a6 100644
--- a/src/wp-content/themes/twentyten/loop.php
+++ b/src/wp-content/themes/twentyten/loop.php
@@ -98,10 +98,13 @@ while ( have_posts() ) :
- ID ) ) : ?>
+ ID ) ) :
+ ?>
|
- term_id ) ) : ?>
+ term_id ) ) : ?>
|