__('A widget that show lastest posts, popular post and latest comments', 'gdl_back_office'))); } // Output of the widget function widget($args, $instance) { global $gdl_widget_date_format;; extract( $args ); $num_fetch = $instance['num_fetch']; $category = $instance['category']; if($category == "All"){ $category = ''; } echo $before_widget; $query_arrays = array( array('id'=>'gdl-widget-latest-post', 'title'=> __('RECENT','gdl_front_end'), 'type'=>'post', 'condition'=>'showposts=' . $num_fetch . '&category_name=' . $category), array('id'=>'gdl-widget-popular-post', 'title'=> __('POPULAR','gdl_front_end'), 'type'=>'post', 'condition'=>'showposts=' . $num_fetch . '&category_name=' . $category . '&orderby=comment_count'), array('id'=>'gdl-widget-latest-comment', 'title'=> __('COMMENTS','gdl_front_end'), 'type'=>'comment' ) ); echo '
comment_content, 'gdl_front_end')); ?>