PHP 7 compatibility issues fixed in Twenty Thirteen and Twenty Fourteen
Props xknown Fixes #37227 --This Line, and those below, will be ignored-- M themes/twentyfourteen/functions.php M themes/twentythirteen/functions.php git-svn-id: https://develop.svn.wordpress.org/trunk@38026 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
408ac29bfb
commit
a68d3d1469
|
@ -319,9 +319,9 @@ function twentyfourteen_the_attached_image() {
|
||||||
|
|
||||||
// If there is more than 1 attachment in a gallery...
|
// If there is more than 1 attachment in a gallery...
|
||||||
if ( count( $attachment_ids ) > 1 ) {
|
if ( count( $attachment_ids ) > 1 ) {
|
||||||
foreach ( $attachment_ids as $attachment_id ) {
|
foreach ( $attachment_ids as $idx => $attachment_id ) {
|
||||||
if ( $attachment_id == $post->ID ) {
|
if ( $attachment_id == $post->ID ) {
|
||||||
$next_id = current( $attachment_ids );
|
$next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,9 +421,9 @@ function twentythirteen_the_attached_image() {
|
||||||
|
|
||||||
// If there is more than 1 attachment in a gallery...
|
// If there is more than 1 attachment in a gallery...
|
||||||
if ( count( $attachment_ids ) > 1 ) {
|
if ( count( $attachment_ids ) > 1 ) {
|
||||||
foreach ( $attachment_ids as $attachment_id ) {
|
foreach ( $attachment_ids as $idx => $attachment_id ) {
|
||||||
if ( $attachment_id == $post->ID ) {
|
if ( $attachment_id == $post->ID ) {
|
||||||
$next_id = current( $attachment_ids );
|
$next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue