wp_get_attachment_thumb_url [ WordPress Function ]
wp_get_attachment_thumb_url ( $post_id = 0 )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_get_attachment_thumb_file, wp_get_attachment_url, wp_get_attachment_image_src, wp_get_attachment_link, wp_get_attachment_image
Retrieve URL for an attachment thumbnail.
Source
<?php
function wp_get_attachment_thumb_url( $post_id = 0 ) {
$post_id = (int) $post_id;
if ( !$post =& get_post( $post_id ) )
return false;
if ( !$url = wp_get_attachment_url( $post->ID ) )
return false;
$sized = image_downsize( $post_id, 'thumbnail' );
if ( $sized )
return $sized[0];
if ( !$thumb = wp_get_attachment_thumb_file( $post->ID ) )
return false;
$url = str_replace(basename($url), basename($thumb), $url);
return apply_filters( 'wp_get_attachment_thumb_url', $url, $post->ID );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/wp get attachment thumb url « WordPress Codex
Function Reference/wp get attachment thumb url. Contents. 1 Description ... Usage. <?php wp_get_attachment_thumb_url( $post_id ); ?> Parameters. $ post_id ...
codex.wordpress.org - php - Wordpress: wp_get_attachment_thumb_url - Stack Overflow
There seems no way of referring to the "big size" "mid size" or "small ... The function you want to use is wp_get_attachment_image_src , but it ...
stackoverflow.com - wp_get_attachment_thumb_url Wordpress hook details -- Adam ...
Applied to the attachment thumbnail URL retrieved by the wp_get_attachment_thumb_URL function. Filter function arguments: thumbnail URL, attachment ID.
adambrown.info - How To Use Thumbnails Generated By WordPress In Your Theme
Jun 8, 2009 ... $img = wp_get_attachment_thumb_url( $attachments[0]->ID); ... However, when I use the wp_get_attachment_thumb_url function it returns ...
webdeveloperplus.com