Don't use array calling for post_status in wp_edit_attachments_query() to prevent any use of the deprecated query_string filter (as in, don't use it) from tanking the page. see #17556, #17559. for 3.1.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
95279728ae
commit
cbba3fe581
|
@ -997,9 +997,9 @@ function wp_edit_attachments_query( $q = false ) {
|
|||
$q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0;
|
||||
$q['post_type'] = 'attachment';
|
||||
$post_type = get_post_type_object( 'attachment' );
|
||||
$states = array( 'inherit' );
|
||||
$states = 'inherit';
|
||||
if ( current_user_can( $post_type->cap->read_private_posts ) )
|
||||
$states[] = 'private';
|
||||
$states .= ',private';
|
||||
|
||||
$q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states;
|
||||
$media_per_page = (int) get_user_option( 'upload_per_page' );
|
||||
|
|
Loading…
Reference in New Issue