__( 'A Recent Post Widget', 'book-landing-page' ), ) // Args ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $book_landing_page_args Widget arguments. * @param array $book_landing_page_instance Saved values from database. */ public function widget( $book_landing_page_args, $book_landing_page_instance ) { $book_landing_page_title = $book_landing_page_instance['title']; $book_landing_page_num_post = absint( $book_landing_page_instance['num_post'] ); $book_landing_page_show_thumb = $book_landing_page_instance['show_thumbnail']; $book_landing_page_show_date = $book_landing_page_instance['show_postdate']; $book_landing_page_qry = new WP_Query( array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $book_landing_page_num_post, 'ignore_sticky_posts' => true ) ); if( $book_landing_page_qry->have_posts() ){ echo $book_landing_page_args['before_widget']; echo $book_landing_page_args['before_title'] . apply_filters( 'the_title', $book_landing_page_title ) . $book_landing_page_args['after_title']; ?>

/>

/>