[wp-trac] [WordPress Trac] #22744: Media search doesn't include file name
WordPress Trac
noreply at wordpress.org
Tue Sep 6 15:27:59 UTC 2016
#22744: Media search doesn't include file name
-------------------------------------------------+-------------------------
Reporter: johnbillion | Owner:
Type: enhancement | wonderboymusic
Priority: normal | Status: reviewing
Component: Media | Milestone: 4.7
Severity: normal | Version: 3.0
Keywords: has-patch needs-testing has-unit- | Resolution:
tests | Focuses:
| administration
-------------------------------------------------+-------------------------
Comment (by joemcgill):
Good points @swissspidy, we can apply this more narrowly.
[attachment:22744.9.diff] only applies the changes from
[attachment:22744.6.diff] to cases where we're calling
`wp_ajax_query_attachments()` via an AJAX request or to times where we're
populating a `WP_Media_List_Table` object by applying a new private
filter, `_filter_query_attachment_filenames()` to the `posts_clauses` hook
in `WP_Query::get_posts()`.
Even if we were able to make the meta_query optional here, we wouldn't be
generating the exact SQL that we need, because `WP_QUERY:parse_search()`
splits the `$q['s']` terms into separate WHERE clauses.
If this approach seems viable, the tests will need to be updated.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22744#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list