I'm building functionality to remove posts that have a certain key/value term pair. All fine and dandy, I can run a query like this:
$posts = get_posts([ 'post_type' => 'any', 'posts_per_page' => -1, 'meta_key' => 'my_key', 'meta_value' => 'my_value', ]);
But I was thinking. Is
any in every case? What I mean is, are there any plugins out there that choose to express complex data structures / collections in any other way than a CPT?
WooCoomer's products are a CPT. Easy Digital Downloads are CPT. RevolutionSlider sliders are CPT (combined with shortcodes). It seems the go-to for expressing, really anything in the WordPress ecosystem are CPTs.
But are there edge cases when this doesn't happen and it's a popular plugin?
My question really is if my query has a chance to fail.