Making WordPress.org

Changeset 920


Ignore:
Timestamp:
10/21/2014 03:57:18 PM (11 years ago)
Author:
kovshenin
Message:

WordCamp Post Types: Use a copy of the columns array when working with each().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    r799 r920  
    649649                    $content .= sprintf( ' <span class="wcpt-session-speakers">%s</span>', implode( ', ', $speakers_names ) );
    650650
     651                $columns_clone = $columns;
     652
    651653                // If the next element in the table is the same as the current one, use colspan
    652654                if ( $key != key( array_slice( $columns, -1, 1, true ) ) ) {
    653                     while ( $pair = each( $columns ) ) {
     655                    while ( $pair = each( $columns_clone ) ) {
    654656                        if ( ! empty( $entry[ $pair['value'] ] ) && $entry[ $pair['value'] ] == $session->ID ) {
    655657                            $colspan++;
Note: See TracChangeset for help on using the changeset viewer.