Merged in feature/81-dev-dev01 (pull request #5)
auto-patch 81-dev-dev01-2023-12-05T22_45_26 * auto-patch 81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user