From 5bcc4e7b35ca598fea58d90c38e25678961c4658 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Sat, 9 Jul 2016 15:11:33 +0000 Subject: [PATCH] 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 Built from https://develop.svn.wordpress.org/trunk@38026 git-svn-id: http://core.svn.wordpress.org/trunk@37967 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfourteen/functions.php | 4 ++-- wp-content/themes/twentythirteen/functions.php | 4 ++-- wp-includes/version.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php index 9b7cf0b6d8..5c07d81fe1 100644 --- a/wp-content/themes/twentyfourteen/functions.php +++ b/wp-content/themes/twentyfourteen/functions.php @@ -319,9 +319,9 @@ function twentyfourteen_the_attached_image() { // If there is more than 1 attachment in a gallery... if ( count( $attachment_ids ) > 1 ) { - foreach ( $attachment_ids as $attachment_id ) { + foreach ( $attachment_ids as $idx => $attachment_id ) { if ( $attachment_id == $post->ID ) { - $next_id = current( $attachment_ids ); + $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ]; break; } } diff --git a/wp-content/themes/twentythirteen/functions.php b/wp-content/themes/twentythirteen/functions.php index e1f27ad09b..a2337b2a43 100644 --- a/wp-content/themes/twentythirteen/functions.php +++ b/wp-content/themes/twentythirteen/functions.php @@ -421,9 +421,9 @@ function twentythirteen_the_attached_image() { // If there is more than 1 attachment in a gallery... if ( count( $attachment_ids ) > 1 ) { - foreach ( $attachment_ids as $attachment_id ) { + foreach ( $attachment_ids as $idx => $attachment_id ) { if ( $attachment_id == $post->ID ) { - $next_id = current( $attachment_ids ); + $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ]; break; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 70adfd7950..3b50f83d93 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-beta2-38025'; +$wp_version = '4.6-beta2-38026'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.