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 |
---|---|
91 | $imagesize = getimagesize( $file ); |
92 | $metadata['width'] = $imagesize[0]; |
93 | $metadata['height'] = $imagesize[1]; |
94 | list($uwidth, $uheight) = wp_shrink_dimensions($metadata['width'], $metadata['height']); |
95 | $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'"; |
96 | $metadata['file'] = $file; |
97 |
|
98 | // make thumbnails and other intermediate sizes |
99 | $sizes = array('thumbnail', 'medium'); |
100 | $sizes = apply_filters('intermediate_image_sizes', $sizes); |
101 | |
102 | foreach ($sizes as $size) { |
103 | $resized = image_make_intermediate_size( $file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") ); |
104 | if ( $resized ) |
105 | $metadata['sizes'][$size] = $resized; |
106 | } |
107 | |
108 | // fetch additional metadata from exif/iptc |
109 | $image_meta = wp_read_image_metadata( $file ); |