From c649fd77bd889b73147efb531c5072b354213a11 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 18 May 2024 15:21:15 +0000 Subject: [PATCH] Shortcodes: Remove redundant variable type check in `get_post_galleries()`. `shortcode_parse_atts()` always returns an array as of [57597], so the check is no longer needed. Follow-up to [40070], [57597]. Props david.binda, swissspidy, oglekler. Fixes #60581. Built from https://develop.svn.wordpress.org/trunk@58168 git-svn-id: http://core.svn.wordpress.org/trunk@57631 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 3 --- wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index c05133859a..0a8621d209 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -5079,9 +5079,6 @@ function get_post_galleries( $post, $html = true ) { $srcs = array(); $shortcode_attrs = shortcode_parse_atts( $shortcode[3] ); - if ( ! is_array( $shortcode_attrs ) ) { - $shortcode_attrs = array(); - } // Specify the post ID of the gallery we're viewing if the shortcode doesn't reference another post already. if ( ! isset( $shortcode_attrs['id'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index db9d046de4..3dd43edc41 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58167'; +$wp_version = '6.6-alpha-58168'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.