diff --git a/src/wp-includes/widgets/class-wp-widget-media-gallery.php b/src/wp-includes/widgets/class-wp-widget-media-gallery.php
index d0081d1..da5e279 100644
|
a
|
b
|
class WP_Widget_Media_Gallery extends WP_Widget_Media { |
| 117 | 117 | $instance, |
| 118 | 118 | array( |
| 119 | 119 | 'link' => $instance['link_type'], |
| | 120 | 'id' => is_singular() ? get_queried_object_id() : 0, |
| 120 | 121 | ) |
| 121 | 122 | ); |
| 122 | 123 | |
| … |
… |
class WP_Widget_Media_Gallery extends WP_Widget_Media { |
| 254 | 255 | } |
| 255 | 256 | } |
| 256 | 257 | return true; |
| | 258 | } elseif ( is_singular() ) { |
| | 259 | $children = get_children( array( |
| | 260 | 'id' => get_queried_object_id(), |
| | 261 | 'post_status' => 'inherit', |
| | 262 | 'post_type' => 'attachment', |
| | 263 | 'post_mime_type' => 'image', |
| | 264 | ) ); |
| | 265 | if ( ! empty( $children ) ) { |
| | 266 | return true; |
| | 267 | } |
| 257 | 268 | } |
| 258 | 269 | return false; |
| 259 | 270 | } |