WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
374 | } elseif ( wp_attachment_is_image( $post->ID ) ) { |
375 | // We have an image without a thumbnail |
376 |
|
377 | $src = wp_get_attachment_url( $post->ID ); |
378 | $src_file = & $file; |
379 | $class = 'attachmentimage'; |
380 | } elseif ( $src = wp_mime_type_icon( $post->ID ) ) { |
381 | // No thumb, no image. We'll look for a mime-related icon instead. |
382 |
|
383 | $icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' ); |
384 | $src_file = $icon_dir . '/' . basename($src); |
385 | } |
386 |
|
387 | if ( !isset($src) || !$src ) |
388 | return false; |
389 |
|
390 | return array($src, $src_file); |
391 | } |
392 |
|