diff --git a/wp-includes/version.php b/wp-includes/version.php index 7c58d52fad..21232c649e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56511'; +$wp_version = '6.4-alpha-56512'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-media-gallery.php b/wp-includes/widgets/class-wp-widget-media-gallery.php index 40cc5c2ba4..ecc446c221 100644 --- a/wp-includes/widgets/class-wp-widget-media-gallery.php +++ b/wp-includes/widgets/class-wp-widget-media-gallery.php @@ -248,6 +248,8 @@ class WP_Widget_Media_Gallery extends WP_Widget_Media { protected function has_content( $instance ) { if ( ! empty( $instance['ids'] ) ) { $attachments = wp_parse_id_list( $instance['ids'] ); + // Prime attachment post caches. + _prime_post_caches( $attachments, false, false ); foreach ( $attachments as $attachment ) { if ( 'attachment' !== get_post_type( $attachment ) ) { return false;