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/twentythirteen/functions.php

    r31260 r31453  
    432432        // or get the URL of the first image attachment.
    433433        else
    434             $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) );
     434            $next_attachment_url = get_attachment_link( current( $attachment_ids ) );
    435435    }
    436436
Note: See TracChangeset for help on using the changeset viewer.