Media: Better handling of JOINs when searching filenames.

Following [38625], any media searches that already included JOINs,
e.g., `tax_queries`, would get trampled when we joined the post meta
table to search for filenames. This preserves existing JOINs and
also only applies the `_filter_query_attachment_filenames()` filter
when a search query is being performed.

Props flixos90, joemcgill.
Fixes #22744.
Built from https://develop.svn.wordpress.org/trunk@38733


git-svn-id: http://core.svn.wordpress.org/trunk@38676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill
2016-10-05 19:51:30 +00:00
parent 0383319aef
commit 173f9b6f22
3 changed files with 11 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38732';
$wp_version = '4.7-alpha-38733';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.