_wp_post_thumbnail_class_filter( array $attr )

Adds a ‘wp-post-image’ class to post thumbnails Uses the begin_fetch_post_thumbnail_html and end_fetch_post_thumbnail_html action hooks to dynamically add/remove itself so as to only filter post thumbnails


Description Description


Parameters Parameters

$attr

(array) (Required) Attributes including src, class, alt, title


Top ↑

Return Return

(array)


Top ↑

Source Source

File: wp-includes/media.php

	if ( empty( $data['path'] ) && ! empty( $data['file'] ) && ! empty( $imagedata['file'] ) ) {
		$file_url     = wp_get_attachment_url( $post_id );
		$data['path'] = path_join( dirname( $imagedata['file'] ), $data['file'] );
		$data['url']  = path_join( dirname( $file_url ), $data['file'] );

Top ↑

Changelog Changelog

Changelog
Version Description
2.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.