'ample-blog-recent-widget', 'description' => esc_html__('Ample Blog Recent Post Widget', 'ample-blog'), ); parent::__construct('ample-blog-recent-post', esc_html__('Ample Blog Recent Post Widget', 'ample-blog'), $opts); } /** * Echo the widget content. */ public function widget( $args, $instance ){ if(!empty($instance)){ $title = apply_filters( 'widget_title', !empty( $instance['title'] ) ? $instance['title'] : '', $instance, $this->id_base ); $show_date = absint( $instance['show_date'] ? 1 : 0); $no_of_post = absint( $instance['no_of_post']); if(!empty($title) || !empty($no_of_post) ) { echo $args['before_widget']; ?>



" class="widefat" />

/>