Skip to content

Commit 7140614

Browse files
swissspidyCopilot
andauthored
Update src/Term_Command.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ffec9fa commit 7140614

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Term_Command.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,16 +748,17 @@ public function prune( $args, $assoc_args ) {
748748
* @var \WP_Term[] $terms
749749
*/
750750

751-
$total = 0;
752-
$successes = 0;
753-
$errors = 0;
751+
$total = count( $terms );
752+
$prunable = 0;
753+
$successes = 0;
754+
$errors = 0;
754755

755756
foreach ( $terms as $term ) {
756757
if ( $term->count > 1 ) {
757758
continue;
758759
}
759760

760-
++$total;
761+
++$prunable;
761762

762763
if ( $dry_run ) {
763764
WP_CLI::log( "Would delete {$taxonomy} {$term->term_id}." );

0 commit comments

Comments
 (0)