Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_wp_post_thumbnail_class_filter [ WordPress Function ]

_wp_post_thumbnail_class_filter ( $attr )
Parameters:
  • (array) $attr Attributes including src, class, alt, title
Returns:
  • (array)
Defined at:



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

Source


<?php
function _wp_post_thumbnail_class_filter$attr ) {
    
$attr['class'] .= ' wp-post-image';
    return 
$attr;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics