mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 05:04:31 +00:00
Avoid a PHP notice in bundled themes if no images were found.
props nabil_kadimi. fixes #28361. git-svn-id: https://develop.svn.wordpress.org/trunk@28585 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -57,9 +57,10 @@ get_header(); ?>
|
||||
if ( $attachment->ID == $post->ID )
|
||||
break;
|
||||
}
|
||||
$k++;
|
||||
|
||||
// If there is more than 1 attachment in a gallery
|
||||
if ( count( $attachments ) > 1 ) {
|
||||
$k++;
|
||||
if ( isset( $attachments[ $k ] ) )
|
||||
// get the URL of the next image attachment
|
||||
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
|
||||
|
||||
@@ -71,9 +71,10 @@
|
||||
if ( $attachment->ID == $post->ID )
|
||||
break;
|
||||
}
|
||||
$k++;
|
||||
|
||||
// If there is more than 1 image attachment in a gallery
|
||||
if ( count( $attachments ) > 1 ) {
|
||||
$k++;
|
||||
if ( isset( $attachments[ $k ] ) )
|
||||
// get the URL of the next image attachment
|
||||
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
|
||||
|
||||
@@ -58,9 +58,9 @@ foreach ( $attachments as $k => $attachment ) :
|
||||
break;
|
||||
endforeach;
|
||||
|
||||
$k++;
|
||||
// If there is more than 1 attachment in a gallery
|
||||
if ( count( $attachments ) > 1 ) :
|
||||
$k++;
|
||||
if ( isset( $attachments[ $k ] ) ) :
|
||||
// get the URL of the next image attachment
|
||||
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
|
||||
|
||||
Reference in New Issue
Block a user