mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Replace array_shift() with reset() where appropriate for performance.
Props SergeyBiryukov. Fixes #31259. git-svn-id: https://develop.svn.wordpress.org/trunk@31829 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -189,7 +189,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) {
|
||||
if ( isset($_GET['addnew']) ) {
|
||||
// Default to the first sidebar
|
||||
$keys = array_keys( $wp_registered_sidebars );
|
||||
$sidebar = array_shift( $keys );
|
||||
$sidebar = reset( $keys );
|
||||
|
||||
if ( isset($_GET['base']) && isset($_GET['num']) ) { // multi-widget
|
||||
// Copy minimal info from an existing instance of this widget to a new instance
|
||||
|
||||
Reference in New Issue
Block a user