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/class-wp-media-list-table.php

    r41161 r43064  
    120120            );
    121121        }
     122
    122123        $type_links['detached'] = '<option value="detached"' . ( $this->detached ? ' selected="selected"' : '' ) . '>' . __( 'Unattached' ) . '</option>';
     124
     125        $type_links['mine'] = sprintf(
     126            '<option value="mine"%s>%s</option>',
     127            selected( 'mine' === $filter, true, false ),
     128            _x( 'Mine', 'media items' )
     129        );
    123130
    124131        if ( $this->is_trash || ( defined( 'MEDIA_TRASH') && MEDIA_TRASH ) ) {
     
    129136            );
    130137        }
     138
    131139        return $type_links;
    132140    }
Note: See TracChangeset for help on using the changeset viewer.