title: Wordpress Media Page lists only pictures of current user and administrator
body: <p>It is possible, I list images of the current user and administrator, below is the code I am using.</p>
  <p>It currently works normally for just the current user to list their images, but I wish the admin images could also be listed.</p>
  <p>In other words, listing the images of the current user and the administrator, is it possible?</p>
  <pre><code>// Page media list only store images
  add_filter( 'posts_where', 'attachments_wpquery_where' );
  function attachments_wpquery_where( $where ) {
      global $current_user;
  
      if ( is_user_logged_in() &amp;&amp; !current_user_can( 'administrator' ) ) {
          // we spreken over een ingelogde user
          if( isset( $_POST['action'] ) ){
              // library query
              if( $_POST['action'] == 'query-attachments' ) {
                  $where .= ' AND post_author='.$current_user-&gt;data-&gt;ID;
              }
          }
      }
  
      return $where;
  }
  </code></pre>