'widget-latest-posts', 'description' => esc_html__( 'Display Latest Posts/ Category with small image and title. Suitable for Right and Left BusinessDeal Sidebar Section', 'businessdeal') ); $control_ops = array('width' => 200, 'height' => 250); parent::__construct( false, $name=esc_html__('T-Spiral: Latest Posts','businessdeal'), $widget_ops, $control_ops ); } /** * Back-end widget form. * * @see WP_Widget::form() * */ public function form( $instance ) { $no_of_posts = ! empty( $instance['no_of_posts'] ) ? absint( $instance['no_of_posts'] ) : 5; $posts_title = ! empty( $instance['posts_title'] ) ? esc_attr( $instance['posts_title'] ) : ''; $latest_posts = ! empty( $instance['latest_posts'] ) ? esc_attr( $instance['latest_posts'] ) : 'latest'; $category = ! empty( $instance['category'] ) ? esc_attr( $instance['category'] ) : 'category'; ?>
id="get_field_id( 'latest_posts' ); ?>" name="get_field_name( 'latest_posts' )); ?>" value="latest"/>
id="get_field_id( 'latest_posts' )); ?>" name="get_field_name( 'latest_posts' )); ?>" value="category"/>
esc_html__('-- Select -- ','businessdeal'),'name' => esc_attr($this->get_field_name( 'category' )), 'selected' => esc_attr($category) ) ); ?>