'widget-blogdesign-tabs widget_tabs posts-thumbnail-widget', 'description' => __( 'Display popular & recent posts, comments and tags.', 'blogdesign' ) ); // Create the widget. parent::__construct( 'blogdesign-tabs', // $this->id_base __( '» Tabs', 'blogdesign' ), // $this->name $widget_options // $this->widget_options ); } /** * Outputs the widget based on the arguments input through the widget controls. * * @since 1.0.0 */ function widget( $args, $instance ) { // Default value. $defaults = array( 'limit' => 5, 'show_date' => true ); $instance = wp_parse_args( (array) $instance, $defaults ); extract( $args ); // Output the theme's $before_widget wrapper. echo wp_kses_post( $before_widget ); ?>
id="get_field_id( 'show_date' ) ); ?>" name="get_field_name( 'show_date' ) ); ?>" />
$number, 'orderby' => 'comment_count', 'post_type' => 'post' ); $i = 1; $popular = new WP_Query( $args ); if ( $popular ) { echo '