_filter_query_attachment_filenames()WP 4.7.0

Deprecated from version 6.0.3. It is no longer supported and can 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.

Return

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() code WP 6.5.2

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;
}