diff -r c7c34916027a -r 177826044cd9 wp/wp-includes/widgets/class-wp-widget-recent-posts.php --- a/wp/wp-includes/widgets/class-wp-widget-recent-posts.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-includes/widgets/class-wp-widget-recent-posts.php Mon Oct 14 18:28:13 2019 +0200 @@ -23,8 +23,8 @@ */ public function __construct() { $widget_ops = array( - 'classname' => 'widget_recent_entries', - 'description' => __( 'Your site’s most recent Posts.' ), + 'classname' => 'widget_recent_entries', + 'description' => __( 'Your site’s most recent Posts.' ), 'customize_selective_refresh' => true, ); parent::__construct( 'recent-posts', __( 'Recent Posts' ), $widget_ops ); @@ -67,12 +67,18 @@ * @param array $args An array of arguments used to retrieve the recent posts. * @param array $instance Array of settings for the current widget. */ - $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, - ), $instance ) ); + $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, + ), + $instance + ) + ); if ( ! $r->have_posts() ) { return; @@ -91,7 +97,7 @@ $title = ( ! empty( $post_title ) ) ? $post_title : __( '(no title)' ); ?>
  • - + ID ); ?> @@ -113,9 +119,9 @@ * @return array Updated settings to save. */ public function update( $new_instance, $old_instance ) { - $instance = $old_instance; - $instance['title'] = sanitize_text_field( $new_instance['title'] ); - $instance['number'] = (int) $new_instance['number']; + $instance = $old_instance; + $instance['title'] = sanitize_text_field( $new_instance['title'] ); + $instance['number'] = (int) $new_instance['number']; $instance['show_date'] = isset( $new_instance['show_date'] ) ? (bool) $new_instance['show_date'] : false; return $instance; } @@ -131,7 +137,7 @@ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5; $show_date = isset( $instance['show_date'] ) ? (bool) $instance['show_date'] : false; -?> + ?>

    @@ -140,6 +146,6 @@

    id="get_field_id( 'show_date' ); ?>" name="get_field_name( 'show_date' ); ?>" />

    -