Bundled themes: After [31453], replace `current()` with `reset()`, which is guaranteed to be the first item.

see #31259, #31260.
Built from https://develop.svn.wordpress.org/trunk@31842


git-svn-id: http://core.svn.wordpress.org/trunk@31824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-03-20 02:04:27 +00:00
parent e838ab315d
commit 31c11b1f0d
5 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@
$images = twentyeleven_get_gallery_images();
if ( $images ) :
$total_images = count( $images );
$image = current( $images );
$image = reset( $images );
?>
<figure class="gallery-thumb">
<a href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a>

View File

@ -330,7 +330,7 @@ function twentyfourteen_the_attached_image() {
// or get the URL of the first image attachment.
else {
$next_attachment_url = get_attachment_link( current( $attachment_ids ) );
$next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
}
}

View File

@ -149,7 +149,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
if ( has_post_thumbnail() ) :
$post_thumbnail = get_the_post_thumbnail();
elseif ( $total_images > 0 ) :
$image = current( $images );
$image = reset( $images );
$post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' );
endif;

View File

@ -75,7 +75,7 @@
$images = twentyten_get_gallery_images();
if ( $images ) :
$total_images = count( $images );
$image = current( $images );
$image = reset( $images );
?>
<div class="gallery-thumb">
<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a>

View File

@ -431,7 +431,7 @@ function twentythirteen_the_attached_image() {
// or get the URL of the first image attachment.
else
$next_attachment_url = get_attachment_link( current( $attachment_ids ) );
$next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
}
printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',