Skip to content

wp theme list show multiple status #224

Closed

Description

@wpbullet

I am creating an audit script and noticed that you cannot use more than one status with the wp theme list command.

Here is an example on a live site:

wp theme list

Output

+----------------+--------+--------+---------+
| name           | status | update | version |
+----------------+--------+--------+---------+
| woodmart-child | active | none   | 1.0.0   |
| woodmart       | parent | none   | 4.4.0   |
+----------------+--------+--------+---------+

I can filter by one status

wp theme list --status=active

Output

+----------------+--------+--------+---------+
| name           | status | update | version |
+----------------+--------+--------+---------+
| woodmart-child | active | none   | 1.0.0   |
+----------------+--------+--------+---------+

But if I try to get both the active and parent status in one command it fails

wp theme list --status=active,parent

Output

+------+--------+--------+---------+
| name | status | update | version |
+------+--------+--------+---------+
+------+--------+--------+---------+

Activity

  1. swissspidy commented on Nov 10, 2023

    @swissspidy
    Member

    Sounds like it might be looking for a status called active,parent and not actually doing any splitting to filter by both.

    So this would be more of an enhancement. I'd be open to accept a PR that covers all relevant commands and also clearly documents the behavior. Would also be good to check other commands as well to ensure they all behave similarly.

  2. thelovekesh commented on Nov 10, 2023

    @thelovekesh
    Member

    @swissspidy IMO It's hard to guess whether the user wants to pass comma-separated strings as multiple strings or the string itself contains the comma. In this case, we can explore the strategy to pass a flag multiple times in case multiple values are intended for a flag.

    Example:

    $ wp --flag=option1 --flag=option2
    # It will be parsed by CLI as `$flag = [ 'option1', 'option2' ]`
    
    $ wp --flag=option1,option2
    # It will be parsed by CLI as `$flag = [ 'option1,option2' ]`
  3. danielbachhuber commented on Nov 11, 2023

    @danielbachhuber
    Member

    Related #159

  4. added a commit that references this issue on Mar 9, 2026
    e579149
  5. added a commit that references this issue on Mar 10, 2026
    2c9c943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions