New feature : Exclude replies (patch given)
-
Hi,
I added a new feature to your amazing plugin: ability to include or exclude replies to the comment list. Could you please add it to the future versions? Here are the diff:
# diff includes/widget-orig.php includes/widget.php
138a139 > $instance['exclude_replies'] = isset( $new_instance['exclude_replies'] ) ? (bool) $new_instance['exclude_replies'] : 0; 173c174 < } \ No newline at end of file --- > }
# diff includes/form-orig.php includes/form.php
113a114,120 > <p> > <input id="<?php echo $this->get_field_id( 'exclude_replies' ); ?>" name="<?php echo $this->get_field_name( 'exclude_replies' ); ?>" type="checkbox" <?php checked( $instance['exclude_replies'] ); ?> /> > <label for="<?php echo $this->get_field_id( 'exclude_replies' ); ?>"> > <?php _e( 'Exclude comment replies', 'comments-widget-plus' ); ?> > </label> > </p> > 164c171 < </div><!-- .cwp-form-tabs --> \ No newline at end of file --- > </div><!-- .cwp-form-tabs -->
# diff includes/functions-orig.php includes/functions.php
111c111 < 'status' => 'approve' --- > 'status' => 'approve' 116c116,120 < } --- > } > > if ( $args['exclude_replies'] == 1 ) { > $query['parent'] = '0'; > } 126c130 < } \ No newline at end of file --- > }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘New feature : Exclude replies (patch given)’ is closed to new replies.