_filter_query_attachment_filenames()
Deprecated since 6.0.3. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
Filter the SQL clauses of an attachment query to include filenames.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Returns
Array. The unmodified clauses.
Usage
_filter_query_attachment_filenames( $clauses );
- $clauses(array) (required)
- An array including WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT, fields (SELECT), and LIMITS clauses.
Changelog
| Since 4.7.0 | Introduced. |
| Deprecated since | 6.0.3 |
_filter_query_attachment_filenames() filter query attachment filenames code WP 6.8.3
function _filter_query_attachment_filenames( $clauses ) {
_deprecated_function( __FUNCTION__, '6.0.3', 'add_filter( "wp_allow_query_attachment_by_filename", "__return_true" )' );
remove_filter( 'posts_clauses', __FUNCTION__ );
return $clauses;
}