__( 'A list or dropdown of categories.', 'becorp' ), ) // Args ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); $number_of_cat = apply_filters( 'widget_title', $instance['number_of_cat'] ); if($number_of_cat=='') { $number_of_cat = 4; } echo $args['before_widget']; if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; ?>