'widget-tabs', 'description' => esc_html__( 'Displays posts by date and comments in tab format.', 'nuntius' ), ), array( 'width' => 200, 'height' => 350, 'id_base' => 'nuntius-widget-tabs' ) ); } /** * Outputs the widget based on the arguments input through the widget controls. * @since 0.1.0 */ function widget( $args, $instance ) { extract( $args ); $args = array(); $posts_per_page = intval( $instance['posts_per_page'] ); $recent_tab_title = $instance['recent_tab_title']; $comments_tab_title = $instance['comments_tab_title']; echo $before_widget; if ( $instance['title'] ) echo $before_title . apply_filters( 'widget_title', $instance['title'] ) . $after_title; ?>
'post', 'ignore_sticky_posts' => true, 'posts_per_page' => $posts_per_page, 'orderby' => 'date', 'order' => 'DESC' ) ); ?> have_posts() ) : ?>
    have_posts() ) : $loop->the_post(); ?> ', '' ); ?>
'post', 'ignore_sticky_posts' => true, 'posts_per_page' => $posts_per_page, 'orderby' => 'comment_count' ) ); ?> have_posts() ) : ?>
    have_posts() ) : $loop->the_post(); ?> ', '' ); ?>
__( 'Most', 'nuntius' ), 'posts_per_page' => 3, 'recent_tab_title' => __( 'Recent', 'nuntius' ), 'comments_tab_title' => __( 'Commented', 'nuntius' ) ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>