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/includes/class-wp-upgrader.php

    r31441 r31829  
    19051905            case 'plugin':
    19061906                $plugin_data = get_plugins( '/' . $update->slug );
    1907                 $plugin_data = array_shift( $plugin_data );
     1907                $plugin_data = reset( $plugin_data );
    19081908                if ( $plugin_data )
    19091909                    return $plugin_data['Name'];
Note: See TracChangeset for help on using the changeset viewer.