Make WordPress Core


Ignore:
Timestamp:
05/01/2018 03:42:38 PM (7 years ago)
Author:
azaozz
Message:

Privacy: add "Mine" filter for media similarly to posts and comments.

Props audrasjb.
See #43820.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r42875 r43056  
    12101210    if ( isset( $q['detached'] ) || ( isset( $q['attachment-filter'] ) && 'detached' == $q['attachment-filter'] ) ) {
    12111211        $q['post_parent'] = 0;
     1212    }
     1213
     1214    if ( isset( $q['mine'] ) || ( isset( $q['attachment-filter'] ) && 'mine' == $q['attachment-filter'] ) ) {
     1215        $q['author'] = get_current_user_id();
    12121216    }
    12131217
Note: See TracChangeset for help on using the changeset viewer.