Make WordPress Core


Ignore:
Timestamp:
05/01/2018 10:03:18 PM (8 years ago)
Author:
SergeyBiryukov
Message:

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

Props audrasjb.
Merged [43056], [43062], [43063] to the 4.9 branch.
Fixes #43820.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/post.php

    r41706 r43064  
    11461146    if ( isset( $q['detached'] ) || ( isset( $q['attachment-filter'] ) && 'detached' == $q['attachment-filter'] ) ) {
    11471147        $q['post_parent'] = 0;
     1148    }
     1149
     1150    if ( isset( $q['mine'] ) || ( isset( $q['attachment-filter'] ) && 'mine' == $q['attachment-filter'] ) ) {
     1151        $q['author'] = get_current_user_id();
    11481152    }
    11491153
Note: See TracChangeset for help on using the changeset viewer.