[wp-trac] [WordPress Trac] #22744: Media search doesn't include file name
WordPress Trac
noreply at wordpress.org
Fri Sep 30 04:12:15 UTC 2016
#22744: Media search doesn't include file name
-------------------------------------------------+-------------------------
Reporter: johnbillion | Owner: joemcgill
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.7
Component: Media | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs- | Focuses:
testing | administration
-------------------------------------------------+-------------------------
Changes (by joemcgill):
* keywords: has-patch has-unit-tests => has-patch has-unit-tests needs-
testing
Comment:
[attachment:22744.12.diff] Maintains existing `JOIN` clauses by adding an
additional `LEFT JOIN` of the `postmeta` table rather than replacing the
whole JOIN clause. Additionally, during debugging I noticed that I was
previously applying the `_filter_query_attachment_filenames()` filter on
all queries from the media library, and not just search queries, so I've
fixed that as well.
This also adds a unit test which includes a meta query to make sure we're
not trampling that `JOIN`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22744#comment:54>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list