esc_html__( 'A widget that displays the popular posts of your blog', 'artcela' ), ) ); } public function widget( $args, $instance ) { extract( $args ); //Our variables from the widget settings. $title = apply_filters('widget_title', $instance['title'] ); $posts = $instance['posts']; $show_thumb = (int) $instance['show_thumb']; $show_date = (int) $instance['show_date']; echo wp_kses($before_widget,artcela_allow_html() ); if ( $title ) { echo '

'. esc_html($title) .'

'; } ?> esc_html__('Popular Posts', 'artcela'), 'posts' => 5, 'show_thumb' => 1, 'show_date' => 0, ); $instance = wp_parse_args( (array) $instance, $defaults ); $show_thumb = isset( $instance[ 'show_thumb' ] ) ? esc_attr( $instance[ 'show_thumb' ] ) : 1; $show_date = isset( $instance[ 'show_date' ] ) ? esc_attr( $instance[ 'show_date' ] ) : 1; // Widget Title: Text Input ?>