'adle_tabbed_widget', 'description' => __( 'Displays tabbed list of popular posts, recent posts & comments', 'adle' ) ); /* Widget control settings. */ $control_ops = array( 'width' => 250, 'height' => 350, 'id_base' => 'adle_tabbed_widget' ); /* Create the widget. */ parent::__construct( 'adle_tabbed_widget', __( 'Sourcewp Popular Posts Widget', 'adle' ), $widget_ops, $control_ops ); } /** * How to display the widget on the screen. */ function widget( $args, $instance ) { extract( $args ); /* Our variables from the widget settings. */ if ( isset( $instance[ 'number' ] ) ) $number = $instance[ 'number' ]; ?>
    $number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1 )) ; ?> have_posts()): $recent_posts->the_post(); ?>
    $number, 'status' => 'approve' ) ); ?>
  • comment_author ) { echo $comment->comment_author; } else { _e('Anonymous','adle'); } ?> comment_post_ID); ?>

    comment_content, 0, strrpos( substr( $comment->comment_content, 0, 60 ), ' ' ) ); ?> comment_content ) > 60 ) { echo '(...)'; } ?>

3); $instance = wp_parse_args( (array) $instance, $defaults ); ?>