title: wordpress show only media user has uploaded in wp_editor
body: <p>I'm creating a wordpress site where the registered user has the ability to create his own post via wp_editor() on the frontend, but just one post.</p>
  
  <p>Now I want to restrict the user to be able to only see his uploaded media. I use the following script in the functions.php, which works in the backend. So if a user goes to the media section in the backend he will only see his uploaded media.</p>
  
  <p>But if the user goes to "insert media" pop-up on the frontend wp_editor he can still see the uploaded media from all the users.</p>
  
  <pre><code>function restricted_media_view( $wp_query ) {
  if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/upload.php' ) !== false  
  || strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/edit.php' ) !== false ) {
      if ( !current_user_can( 'level_5' ) ) {
          global $current_user;
          $wp_query-&gt;set( 'author', $current_user-&gt;id );
      }
      }
  }
  add_filter('parse_query', 'restricted_media_view' );
  </code></pre>
  
  <p>Do you have any idea hot to solve this annoyance? Thank you!</p>