diff --git a/wp-includes/version.php b/wp-includes/version.php index d7ddbe3175..cd9d449d52 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-beta2-41889'; +$wp_version = '4.9-beta2-41890'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-recent-posts.php b/wp-includes/widgets/class-wp-widget-recent-posts.php index c8d19055b4..37843c3a8b 100644 --- a/wp-includes/widgets/class-wp-widget-recent-posts.php +++ b/wp-includes/widgets/class-wp-widget-recent-posts.php @@ -51,8 +51,9 @@ class WP_Widget_Recent_Posts extends WP_Widget { $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; - if ( ! $number ) + if ( ! $number ) { $number = 5; + } $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false; /** @@ -70,31 +71,35 @@ class WP_Widget_Recent_Posts extends WP_Widget { 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', - 'ignore_sticky_posts' => true + 'ignore_sticky_posts' => true, ), $instance ) ); - if ($r->have_posts()) : + if ( ! $r->have_posts() ) { + return; + } ?> - - - + +