Bundled themes: After [31453], replace current()
with reset()
, which is guaranteed to be the first item.
see #31259, #31260. git-svn-id: https://develop.svn.wordpress.org/trunk@31842 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
850e6b2278
commit
eed94919b0
@ -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>
|
||||
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>',
|
||||
|
Loading…
Reference in New Issue
Block a user