Media Library design updates from Andy. see #5911

git-svn-id: https://develop.svn.wordpress.org/trunk@6910 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-02-19 06:13:20 +00:00
parent 56c5b70b17
commit 5f85c2dc0c
7 changed files with 493 additions and 122 deletions

View File

@@ -786,6 +786,7 @@ class WP_Query {
$distinct = '';
$whichcat = '';
$whichauthor = '';
$whichmimetype = '';
$where = '';
$limits = '';
$join = '';
@@ -1151,7 +1152,12 @@ class WP_Query {
$whichauthor .= ' AND (post_author = '.intval($q['author']).')';
}
$where .= $search.$whichcat.$whichauthor;
// MIME-Type stuff for attachment browsing
if ( '' != $q['post_mime_type'] )
$whichmimetype = wp_post_mime_type_where($q['post_mime_type']);
$where .= $search.$whichcat.$whichauthor.$whichmimetype;
if ( empty($q['order']) || ((strtoupper($q['order']) != 'ASC') && (strtoupper($q['order']) != 'DESC')) )
$q['order'] = 'DESC';