_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
Return Return
(array)
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'] );
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |