__( 'Display recent, most commented and recently commented entries.' , 'amazing-widgets') ) ); } public function form($instance) { $defaults = array( 'title' => 'Featured Posts', 'nr_posts' => 5, 'color_scheme' => 'light_colors', 'disable_recent' => '', 'disable_popular' => '', 'disable_comments' => '', 'disable_commentsmeta' => '', 'disable_datemeta' => '', ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>

id="get_field_id('disable_recent'); ?>" name="get_field_name('disable_recent'); ?>" />

id="get_field_id('disable_popular'); ?>" name="get_field_name('disable_popular'); ?>" />

id="get_field_id('disable_comments'); ?>" name="get_field_name('disable_comments'); ?>" />

id="get_field_id('disable_commentsmeta'); ?>" name="get_field_name('disable_commentsmeta'); ?>" />

id="get_field_id('disable_datemeta'); ?>" name="get_field_name('disable_datemeta'); ?>" />

'alignright', 'itemprop' => 'image' ) ); echo "

$title

\n"; if ( ($commentsmeta == '') or ($postdate == '') ) { echo "

\n"; if ( $postdate !== 'on') { echo ""; } if ( ( comments_open() ) && ($commentsmeta !== 'on')) { echo ""; echo "$comments_number \n"; echo " \n"; } } echo "

"; } } echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title']; echo esc_html( $instance['title'] ); echo $args['after_title']; } ?>
    (int)($instance['nr_posts']), 'ignore_sticky_posts' => 1 ) ); set_transient( 'aw_recent_posts', $wp_query, 4 * HOUR_IN_SECONDS ); } while ( $wp_query->have_posts() ) : $wp_query->the_post(); echo '
  • '; aw_tab_content($instance['disable_datemeta'], $instance['disable_commentsmeta']); echo '
  • '; $count++; endwhile; wp_reset_postdata(); ?>
    (int)($instance['nr_posts']), 'orderby' => 'comment_count', 'ignore_sticky_posts' => 1 ) ); set_transient( 'aw_popular_posts', $wp_query, 4 * HOUR_IN_SECONDS ); } while ( $wp_query->have_posts() ) : $wp_query->the_post(); echo '
  • '; aw_tab_content($instance['disable_datemeta'], $instance['disable_commentsmeta']); echo '
  • '; $count++; endwhile; wp_reset_postdata(); ?>
    'approve', 'number' => (int)($instance['nr_posts']), ); $comments = get_comments($query_args); foreach($comments as $comment) : echo '
  • '; echo get_avatar( $comment->comment_author_email, 35 ); echo ('' . $comment->comment_author . ': ' . get_the_title($comment->comment_post_ID) . ''); echo '
  • '; endforeach; ?>