wp_get_attachment_thumb_file [ WordPress Function ]
wp_get_attachment_thumb_file ( $post_id = 0 )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_get_attachment_thumb_url, wp_get_attachment_url, wp_get_attachment_image, wp_get_attachment_link, wp_get_attachment_metadata
Retrieve thumbnail for an attachment.
Source
<?php
function wp_get_attachment_thumb_file( $post_id = 0 ) {
$post_id = (int) $post_id;
if ( !$post =& get_post( $post_id ) )
return false;
if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) )
return false;
$file = get_attached_file( $post->ID );
if ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) )
return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
return false;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/wp get attachment thumb file « WordPress Codex
Function Reference/wp get attachment thumb file. Contents. 1 Description ... Usage. <?php wp_get_attachment_thumb_file( $post_id ); ?> Parameters. $ post_id ...
codex.wordpress.org - WordPress › Support » Tags — wp_get_attachment_thumb_file
Topic, Posts, Last Poster, Freshness. Fix for bug in wp_get_attachment_thumb_file, 4, egado, 3 days. [closed] Fix for bug in wp_get_attachment_thumb_file, 1 ...
wordpress.org - #17262 (wp_get_attachment_thumb_file is always false ...
The issue is that on line 3863 we always search for $imagedatathumb? and it never exists. Instead we have $imagedatathumbnail?. This always exists.
core.trac.wordpress.org - wp_get_attachment_thumb_file Wordpress hook details -- Adam ...
Applied to the attachment thumbnail file retrieved by the wp_get_attachment_thumb_file function. Filter function arguments: thumbnail file, attachment ID.
adambrown.info
Gebruikersdiscussies [ wordpress.org ]
- egado on "Fix for bug in wp_get_attachment_thumb_file"
- frankindelicato on "Fix for bug in wp_get_attachment_thumb_file"
- egado on "Fix for bug in wp_get_attachment_thumb_file"
- frankindelicato on "Fix for bug in wp_get_attachment_thumb_file"
- frankindelicato on "Fix for bug in wp_get_attachment_thumb_file"
- cleinonen on "Image gallery based on post attachments"
- valfreixo on "Image gallery based on post attachments"
- cleinonen on "Image gallery based on post attachments"
- cleinonen on "Image gallery based on post attachments"