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 |
|---|---|
| 12 | } |
| 13 | } |
| 14 | if ( isset($attachment_data['width']) ) |
| 15 | list($width,$height) = wp_shrink_dimensions($attachment_data['width'], $attachment_data['height'], 171, 128); |
| 16 | |
| 17 | ob_start(); |
| 18 | the_title(); |
| 19 | $post_title = attribute_escape(ob_get_contents()); |
| 20 | ob_end_clean(); |
| 21 | $post_content = apply_filters( 'content_edit_pre', $post->post_content ); |
| 22 | |
| 23 | $class = 'text'; |
| 24 | $innerHTML = get_attachment_innerHTML( $id, false, $dims ); |
| 25 | if ( $image_src = get_attachment_icon_src() ) { |
| 26 | $image_rel = wp_make_link_relative($image_src); |
| 27 | $innerHTML = ' ' . str_replace($image_src, $image_rel, $innerHTML); |
| 28 | $class = 'image'; |
| 29 | } |
| 30 | |