WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/19/2015 03:55:39 AM (7 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-admin/widgets.php

    r31420 r31829  
    190190        // Default to the first sidebar
    191191        $keys = array_keys( $wp_registered_sidebars );
    192         $sidebar = array_shift( $keys );
     192        $sidebar = reset( $keys );
    193193
    194194        if ( isset($_GET['base']) && isset($_GET['num']) ) { // multi-widget
Note: See TracChangeset for help on using the changeset viewer.