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

Abierto
#538 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
php
Área
cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
PHP
Estrellas
105
Forks
97
Merge medio
2 h 1 min
PR fusionados (30 d)
12

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de wp-cli/entity-command

Todos los issues de wp-cli/entity-command

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.