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/twentyten/loop.php

    r31266 r31453  
    7676                    if ( $images ) :
    7777                        $total_images = count( $images );
    78                         $image = array_shift( $images );
     78                        $image = current( $images );
    7979                ?>
    8080                        <div class="gallery-thumb">
Note: See TracChangeset for help on using the changeset viewer.