'widget widget_popular_post', 'description' => __( 'Retrive Popular Posts Widgets', 'adore-blog' ), ); parent::__construct( 'adore_blog_popular_posts_widget', __( 'AT: Popular Posts Widget', 'adore-blog' ), $adore_blog_popular_post_widget ); } /** * Front-end display of widget. */ public function widget( $args, $instance ) { if ( ! isset( $args['widget_id'] ) ) { $args['widget_id'] = $this->id; } $popular_post_title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : ''; $popular_post_title = apply_filters( 'widget_title', $popular_post_title, $instance, $this->id_base ); $popular_post_post_offset = isset( $instance['offset'] ) ? absint( $instance['offset'] ) : ''; $popular_post_category = isset( $instance['category'] ) ? absint( $instance['category'] ) : ''; echo $args['before_widget']; if ( ! empty( $popular_post_title ) ) { ?>