Media: Refactor search by filename within the admin.

Props vortfu, xknown, peterwilsoncc, paulkevan.


git-svn-id: https://develop.svn.wordpress.org/trunk@54524 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2022-10-17 11:17:38 +00:00
parent 5fcdee1b4d
commit 8836d46822
7 changed files with 80 additions and 54 deletions
+1 -1
View File
@@ -1308,7 +1308,7 @@ function wp_edit_attachments_query_vars( $q = false ) {
// Filter query clauses to include filenames.
if ( isset( $q['s'] ) ) {
add_filter( 'posts_clauses', '_filter_query_attachment_filenames' );
add_filter( 'wp_allow_query_attachment_by_filename', '__return_true' );
}
return $q;