_wp_post_thumbnail_class_filter_add()WP 2.9.0

Adds '_wp_post_thumbnail_class_filter' callback to the wp_get_attachment_image_attributes hook. Internal use only.

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

null. Nothing (null).

Usage

_wp_post_thumbnail_class_filter_add( $attr );
$attr(string[]) (required)
Array of thumbnail attributes including src, class, alt, title, keyed by attribute name.

Changelog

Since 2.9.0 Introduced.

_wp_post_thumbnail_class_filter_add() code WP 6.5.2

function _wp_post_thumbnail_class_filter_add( $attr ) {
	add_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );
}