Ticket #37227: 37227-twentythirteen.diff
File 37227-twentythirteen.diff, 614 bytes (added by , 9 years ago) |
---|
-
twentythirteen/functions.php
421 421 422 422 // If there is more than 1 attachment in a gallery... 423 423 if ( count( $attachment_ids ) > 1 ) { 424 foreach ( $attachment_ids as $ attachment_id ) {424 foreach ( $attachment_ids as $idx => $attachment_id ) { 425 425 if ( $attachment_id == $post->ID ) { 426 $next_id = current( $attachment_ids );426 $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ]; 427 427 break; 428 428 } 429 429 }