Skip to content

Commit 000c832

Browse files
committed
fix: remove $exclude code
1 parent e0f124b commit 000c832

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Comment_Command.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -758,24 +758,13 @@ public function exists( $args ) {
758758
* @param array $args Passed-in arguments.
759759
* @param bool $all All flag.
760760
* @param string $verb Optional. Verb to use. Defaults to 'delete'.
761-
* @param string $exclude Comma separated list of comment IDs.
762761
* @return array Same as $args if not all, otherwise all comment IDs.
763762
*/
764-
private function check_optional_args_and_all( $args, $all, $verb = 'delete', $exclude = null ) {
763+
private function check_optional_args_and_all( $args, $all, $verb = 'delete' ) {
765764
if ( $all ) {
766765
$args = $this->get_all_comment_ids();
767766
}
768767

769-
if ( $all && $exclude ) {
770-
$exclude_list = array_map( 'intval', explode( ',', trim( $exclude, ',' ) ) );
771-
$args = array_filter(
772-
$args,
773-
static function ( $id ) use ( $exclude_list ) {
774-
return ! in_array( (int) $id, $exclude_list, true );
775-
}
776-
);
777-
}
778-
779768
if ( empty( $args ) ) {
780769
if ( ! $all ) {
781770
WP_CLI::error( 'Please specify one or more comment IDs, or use --all.' );

0 commit comments

Comments
 (0)