mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +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:
@@ -4673,7 +4673,7 @@ function wp_old_slug_redirect() {
|
||||
if ( is_array( $post_type ) ) {
|
||||
if ( count( $post_type ) > 1 )
|
||||
return;
|
||||
$post_type = array_shift( $post_type );
|
||||
$post_type = reset( $post_type );
|
||||
}
|
||||
|
||||
// Do not attempt redirect for hierarchical post types
|
||||
|
||||
Reference in New Issue
Block a user