[wp-trac] [WordPress Trac] #22744: Media search doesn't include file name

WordPress Trac noreply at wordpress.org
Fri Sep 30 18:06:28 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
-------------------------------------------------+-------------------------

Comment (by flixos90):

 @swissspidy I'm not sure if we should do that. We can to be a 100 percent
 safe, but the filter removes itself automatically when it's run.

 Otherwise [attachment:22744.12.diff] looks good to me. The one thing that
 might cause issues is that we completely override the `groupby` clause as
 this might affect some custom logic which specifies it. We might wanna add
 another unit test with a `tax_query`, just to be on the safe side (I
 tested it manually and it works though).

 @joemcgill On Slack you asked about possible improvements for testing the
 full integration path. By that do you mean we should test for example
 whether `wp_edit_attachments_query_vars()` and
 `wp_ajax_query_attachments()` add the filter properly and return proper
 results? We could do that, although I'm not sure whether this would be
 very helpful. Other than testing these two functions, I don't currently
 see a way to test this in a "larger scope".

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22744#comment:58>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list