WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/13/2015 05:51:22 PM (6 years ago)
Author:
lancewillett
Message:

Bundled themes: replace array_shift() with current() for performance.

Props SergeyBiryukov, fixes #31260.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/content-gallery.php

    r25625 r31453  
    3737                if ( $images ) :
    3838                    $total_images = count( $images );
    39                     $image = array_shift( $images );
     39                    $image = current( $images );
    4040            ?>
    4141                <figure class="gallery-thumb">
Note: See TracChangeset for help on using the changeset viewer.