diff --git a/wp-includes/version.php b/wp-includes/version.php index e5900953f2..5023a9c225 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-beta4-42029'; +$wp_version = '4.9-beta4-42030'; /** * 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-image.php b/wp-includes/widgets/class-wp-widget-media-image.php index 780ceacad5..4ebc42d66e 100644 --- a/wp-includes/widgets/class-wp-widget-media-image.php +++ b/wp-includes/widgets/class-wp-widget-media-image.php @@ -177,8 +177,10 @@ class WP_Widget_Media_Image extends WP_Widget_Media { $attachment = get_post( $instance['attachment_id'] ); } if ( $attachment ) { - $caption = $attachment->post_excerpt; - if ( $instance['caption'] ) { + $caption = ''; + if ( ! isset( $instance['caption'] ) ) { + $caption = $attachment->post_excerpt; + } elseif ( trim( $instance['caption'] ) ) { $caption = $instance['caption']; }