Add an `--all` flag to `wp comment delete`
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
Feature Request
- Yes, I reviewed the contribution guidelines.
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.
- 主要语言
- PHP
- 星标
- 105
- 派生
- 97
- 平均合并
- 2 小时 1 分钟
- 30 天内合并 PR
- 12
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wp-cli/entity-command 的其他 Issue
-
command:option command:option-update
难度 5/5 一周以上 新手友好度 35/100
wp-cli/entity-command#230 · 11 条评论 · 1 个 reaction ·
-
command:post-meta-get command:post-meta-list
难度 4/5 3-5 天 新手友好度 35/100
wp-cli/entity-command#142 · 10 条评论 · 2 个 reaction ·
查看 wp-cli/entity-command 的全部 Issue
相似的 Issue
-
sync-en
难度 1/5 1-3 小时 新手友好度 85/100
-
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 68/100
getgrav/grav-plugin-api#45 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
RSS-Bridge/rss-bridge#5098 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
phingofficial/phing#2025 ·