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