Fix a misnamed variable, which caused the query-attachments ajax handler to ignore all input. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@21682 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-08-31 04:32:25 +00:00
parent 215be466c3
commit 84a9e47c0d
1 changed files with 2 additions and 2 deletions

View File

@ -1829,8 +1829,8 @@ function wp_ajax_get_attachment() {
* @since 3.5.0
*/
function wp_ajax_query_attachments() {
$qvs = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
$qvs = array_intersect_key( $qvs, array_flip( array( 's', 'order', 'orderby', 'posts_per_page', 'paged' ) ) );
$query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
$query = array_intersect_key( $query, array_flip( array( 's', 'order', 'orderby', 'posts_per_page', 'paged' ) ) );
$query['post_type'] = 'attachment';
$query['post_status'] = 'inherit';