Changeset 27561
- Timestamp:
- 03/17/2014 05:00:22 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/default-widgets.php
r27412 r27561 562 562 $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts' ); 563 563 $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); 564 $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 10;564 $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; 565 565 if ( ! $number ) 566 $number = 10;566 $number = 5; 567 567 $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false; 568 568 … … 677 677 } 678 678 679 680 679 extract($args, EXTR_SKIP); 680 $output = ''; 681 681 682 682 $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Comments' ); … … 684 684 $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; 685 685 if ( ! $number ) 686 686 $number = 5; 687 687 688 688 $comments = get_comments( apply_filters( 'widget_comments_args', array( 'number' => $number, 'status' => 'approve', 'post_status' => 'publish' ) ) ); … … 700 700 $output .= '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>'; 701 701 } 702 702 } 703 703 $output .= '</ul>'; 704 704 $output .= $after_widget;
Note: See TracChangeset
for help on using the changeset viewer.