__('A widget that displays tabbed widget on your blog', 'bloomy'), ) ); } public function widget( $args, $instance ) { extract( $args ); //Our variables from the widget settings. $recent_posts_count = isset ( $instance['recent_posts_count'] ) ? intval( $instance['recent_posts_count'] ) : '4'; $show_thumb = isset( $instance[ 'show_thumb' ] ) ? esc_attr( $instance[ 'show_thumb' ] ) : 1; $show_cat = isset( $instance[ 'show_cat' ] ) ? esc_attr( $instance[ 'show_cat' ] ) : 0; $show_author = isset( $instance[ 'show_author' ] ) ? esc_attr( $instance[ 'show_author' ] ) : 0; $show_date = isset( $instance[ 'show_date' ] ) ? esc_attr( $instance[ 'show_date' ] ) : 1; $show_comments = isset( $instance[ 'show_comments' ] ) ? esc_attr( $instance[ 'show_comments' ] ) : 0; // Before Widget //echo $before_widget; ?>
4, 'show_thumb' => 1, 'show_cat' => 0, 'show_author' => 0, 'show_date' => 1, 'show_comments' => 0 ); $instance = wp_parse_args( (array) $instance, $defaults ); $show_thumb = isset( $instance[ 'show_thumb' ] ) ? esc_attr( $instance[ 'show_thumb' ] ) : 1; $show_cat = isset( $instance[ 'show_cat' ] ) ? esc_attr( $instance[ 'show_cat' ] ) : 1; $show_author = isset( $instance[ 'show_author' ] ) ? esc_attr( $instance[ 'show_author' ] ) : 1; $show_date = isset( $instance[ 'show_date' ] ) ? esc_attr( $instance[ 'show_date' ] ) : 1; ?>