Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'ajax_query_attachments_args', 'show_current_user_attachments' );
- function show_current_user_attachments( $query ) {
- $user_id = get_current_user_id();
- if ( $user_id ) {
- $query['author'] = $user_id;
- }
- return $query;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement