In Recent Posts widget set default number to 5.

props afercia.
fixes #27417.

git-svn-id: https://develop.svn.wordpress.org/trunk@27561 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-03-17 17:00:22 +00:00
parent d4986f1b61
commit adf2b46b8e

View File

@ -561,9 +561,9 @@ class WP_Widget_Recent_Posts extends WP_Widget {
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts' );
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
$number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 10;
$number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5;
if ( ! $number )
$number = 10;
$number = 5;
$show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false;
$r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) );