_wp_post_thumbnail_class_filter


_wp_post_thumbnail_class_filter ( $attr )

Parameters:
  • (array) $attr Thumbnail attributes including src, class, alt, title.
Returns:
  • (array) Modified array of attributes including the new 'wp-post-image' class.
Defined at:

Description

Adds a 'wp-post-image' class to post thumbnails. Internal use only.

Uses the {@see 'begin_fetch_post_thumbnail_html'} and {@see 'end_fetch_post_thumbnail_html'} action hooks to dynamically add/remove itself so as to only filter post thumbnails.

Related Functions

_wp_post_thumbnail_class_filter_add, _wp_post_thumbnail_class_filter_remove, _wp_preview_post_thumbnail_filter, _wp_post_thumbnail_html, set_post_thumbnail_size

Top Google Results

User discussions

wpseek mobile