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
+17
View File
@@ -4511,3 +4511,20 @@ function global_terms_enabled() {
return false;
}
/**
* Filter the SQL clauses of an attachment query to include filenames.
*
* @since 4.7.0
* @deprecated 6.0.3
* @access private
*
* @param array $clauses An array including WHERE, GROUP BY, JOIN, ORDER BY,
* DISTINCT, fields (SELECT), and LIMITS clauses.
* @return array The unmodified clauses.
*/
function _filter_query_attachment_filenames( $clauses ) {
_deprecated_function( __FUNCTION__, '4.9.9', 'add_filter( "wp_allow_query_attachment_by_filename", "__return_true" )' );
remove_filter( 'posts_clauses', __FUNCTION__ );
return $clauses;
}