Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List all inactive sidebars on a site. #38

Open
lgedeon opened this issue Mar 17, 2020 · 1 comment
Open

List all inactive sidebars on a site. #38

lgedeon opened this issue Mar 17, 2020 · 1 comment

Comments

@lgedeon
Copy link

lgedeon commented Mar 17, 2020

Background: We have a network of sites that did some crazy things in the past and now have hundreds of inactive sidebars each filled with a dozen or more widgets.

Desired functionality: We would like to remove all widgets in inactive sidebars via cli. I considered writing a custom cli to do this, but I thought that this might be a common enough problem to warrant adding to the wp widget or wp sidebar commands.

Questions:
Is this something that would be worth adding?
How should this be added?

Possible solutions: (please adjust as needed)
$ wp widget reset (wp sidebar list --filter=inactive )
or
$ wp widget reset (wp sidebar list --inactive )
or
$ wp widget reset --inactive
or
$ wp widget reset --all-inactive

@danielbachhuber
Copy link
Member

This seems like a reasonable improvement! I don't have any strong opinions on the implementation; I'd need to refresh myself on the widget internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants