Make WordPress Core


Ignore:
Timestamp:
03/19/2015 03:55:39 AM (9 years ago)
Author:
wonderboymusic
Message:

Replace array_shift() with reset() where appropriate for performance.

Props SergeyBiryukov.
Fixes #31259.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r31458 r31829  
    46744674            if ( count( $post_type ) > 1 )
    46754675                return;
    4676             $post_type = array_shift( $post_type );
     4676            $post_type = reset( $post_type );
    46774677        }
    46784678
Note: See TracChangeset for help on using the changeset viewer.