Restricting Users to View Only Media Library Items They Upload to post
-
hello, this plugin saves me from having a lot of snippets to paste in my site, but despite this, I still have a problem,
I need to tell wordpress to display only the images attached to the post only.I did a test to illustrate the problem to you
Image testand here the code snippet I’m using for this task.
add_action( 'admin_footer-post-new.php', 'media_library_filter' ); add_action( 'admin_footer-post.php', 'media_library_filter' ); function media_library_filter() { ?> <script type="text/javascript"> jQuery(document).on("DOMNodeInserted", function(){ jQuery('select.attachment-filters [value="uploaded"]').attr( 'selected', true ).parent().trigger('change'); }); </script> <?php }
but apparently it doesn’t work well now after several updates of ACF and wordpress and maybe other things. i have bugs .. what is certain. he is not reliable now
can you integrate this as an option to check?
otherwise I found other codes and articles but nothing seems to work this could help you to understand.
I thought I was done with this problem but unfortunately today it becomes a priority
- The topic ‘Restricting Users to View Only Media Library Items They Upload to post’ is closed to new replies.