Skip to content

Ability to Exclude Revisions from wp db search #156

Description

@mrwweb

Describe your use case and the problem you are facing

I often use wp db search to determine if a certain shortcode, class, etc. is in use. These search results include revisions, so it's possible that a search with 10 results only represents a single post. This makes the function significantly less useful for what feels like a pretty simple use case.

Describe the solution you'd like

The simplest solution would be some type of standalone flag so I could do something like wp db search 'string' --exclude-revisions.

My only hesitancy in suggesting this is wondering whether some more generalized way to include or exclude other things would be useful. On the flipside, a super powerful way to limit the search query would probably end up being much less user-friendly.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions