Add an `--all` flag to `wp comment delete`

Aperta
#538 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
cli

Direzione di ricerca

Start at the wp comment delete entry point and compare its behavior with wp plugin delete --all, wp theme delete --all, and wp site empty. Clarify the confirmation and --yes requirements before implementing; done means wp comment delete --all removes all comments safely, with the intended non-interactive behavior covered by tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

command:comment-delete state:unconfirmed

Feature Request

Describe your use case and the problem you are facing

A website under my purview had hundreds of thousands of spam comments. It would be nice to be able to remove them in one fell swoop without having to resort to database queries (truncate wp_comments; truncate wp_commentmeta;).

Describe the solution you'd like

I'd like to add a flag to the wp comment delete subcommand:

wp comment delete --all

This may have a confirmation prompt along the lines of "Are you sure you want to delete XXXXX comments? (Y/n)" There might also be a "--yes" option for non-interactive use:

wp comment delete --all --yes

The addition of the "--all" flag would mirror similar-ish flags for the wp plugin delete --all and wp theme delete --all commands.

I'm aware that the wp site empty command also removes all comments, but this is a little bit different.

I'd be happy to take a stab at adding this modification, if approved.

Lingua principale
PHP
Stelle
105
Fork
97
Merge medio
2h 1m
PR unite (30g)
12

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wp-cli/entity-command

Tutte le issue di wp-cli/entity-command

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.