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 |
---|---|
358 | } elseif ( wp_attachment_is_image( $post->ID ) ) { |
359 | // We have an image without a thumbnail |
360 |
|
361 | $src = wp_get_attachment_url( $post->ID ); |
362 | $src_file = & $file; |
363 | $class = 'attachmentimage'; |
364 | } elseif ( $src = wp_mime_type_icon( $post->ID ) ) { |
365 | // No thumb, no image. We'll look for a mime-related icon instead. |
366 |
|
367 | $icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' ); |
368 | $src_file = $icon_dir . '/' . basename($src); |
369 | } |
370 |
|
371 | if ( !isset($src) || !$src ) |
372 | return false; |
373 |
|
374 | return array($src, $src_file); |
375 | } |
376 |
|