'widget_sullivan_recent_posts', 'description' => __( 'Displays recent blog entries.', 'sullivan' ), ); parent::__construct( 'widget_sullivan_recent_posts', __( 'Recent Posts', 'sullivan' ), $widget_ops ); } function widget( $args, $instance ) { // Outputs the content of the widget extract( $args ); // Make before_widget, etc available. $widget_title = null; $number_of_posts = null; $widget_title = wp_kses_post( apply_filters( 'widget_title', $instance['widget_title'] ) ); $number_of_posts = esc_attr( $instance['number_of_posts'] ); echo $before_widget; if ( ! empty( $widget_title ) ) { echo $before_title . $widget_title . $after_title; } if ( $number_of_posts == 0 ) { $number_of_posts = 5; } global $post; $ignore = get_option( 'sticky_posts' ); $recent_posts = get_posts( array( 'ignore' => $ignore, 'posts_per_page' => $number_of_posts, 'post_status' => 'publish', ) ); if ( $recent_posts ) : ?>

()