Make WordPress Core


Ignore:
Timestamp:
02/13/2015 05:51:22 PM (12 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/twentyfourteen/functions.php

    r30866 r31453  
    331331                // or get the URL of the first image attachment.
    332332                else {
    333                         $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) );
     333                        $next_attachment_url = get_attachment_link( current( $attachment_ids ) );
    334334                }
    335335        }
Note: See TracChangeset for help on using the changeset viewer.