Twenty Fourteen: remove `wp_is_mobile()` call from post thumbnail size logic as it's not intended for front-end use. Props kwight, fixes #26221.

Built from https://develop.svn.wordpress.org/trunk@26599


git-svn-id: http://core.svn.wordpress.org/trunk@26489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-12-04 03:29:10 +00:00
parent 84d9b4241b
commit 7e7666d514
1 changed files with 5 additions and 5 deletions

View File

@ -165,10 +165,10 @@ add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
/** /**
* Display an optional post thumbnail on a single view. * Display an optional post thumbnail.
* *
* Adds an anchor element to the post thumbnail, when on * Wraps the post thumbnail in an anchor element on index
* index views, and a div element when on a single view. * views, or a div element when on single views.
* *
* @since Twenty Fourteen 1.0 * @since Twenty Fourteen 1.0
* *
@ -184,7 +184,7 @@ function twentyfourteen_post_thumbnail() {
<div class="post-thumbnail"> <div class="post-thumbnail">
<?php <?php
if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) { if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
the_post_thumbnail( 'twentyfourteen-full-width' ); the_post_thumbnail( 'twentyfourteen-full-width' );
} else { } else {
the_post_thumbnail(); the_post_thumbnail();
@ -196,7 +196,7 @@ function twentyfourteen_post_thumbnail() {
<a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
<?php <?php
if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) { if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
the_post_thumbnail( 'twentyfourteen-full-width' ); the_post_thumbnail( 'twentyfourteen-full-width' );
} else { } else {
the_post_thumbnail(); the_post_thumbnail();