as the title implies - I would like to suppress attachments of a specific post type(s) from showing up in the "Media Library"
Not asking for a code example, but if someone can point me to the right hook it would be much appreciated. Thanks!
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
For the media library you can use the
pre_get_posts hook targeting
upload.php by means of
global variable, or even better, because globals are the devils child, by means of
get_current_screen(). I'm assuming you want to target the media modal tab too - because targeting only one, but not the other, doesn't make much sense after all -, you can do that via the