'popular-tabs', 'description' => esc_html__( 'Displays popular posts by number of views and comments in tab format.', 'news' ) ); /* Set up the widget control options. */ $control_options = array( 'width' => 200, 'height' => 350 ); /* Create the widget. */ $this->WP_Widget( 'news-popular-tabs', // $this->id_base __( 'News: Popular Tabs', 'news' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); } /** * Outputs the widget based on the arguments input through the widget controls. * * @since 0.1.0 */ function widget( $sidebar, $instance ) { extract( $sidebar ); /* Output the theme's $before_widget wrapper. */ echo $before_widget; /* If a title was input by the user, display it. */ if ( !empty( $instance['title'] ) ) echo $before_title . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $after_title; ?>