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 |
---|---|
18 | * @param mixed $file Filename of the original image, Or attachment id. |
19 | * @param int $max_side Maximum length of a single side for the thumbnail. |
20 | * @param mixed $deprecated Never used. |
21 | * @return string Thumbnail path on success, Error string on failure. |
22 | */ |
23 | function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { |
24 | if ( !empty( $deprecated ) ) |
25 | _deprecated_argument( __FUNCTION__, '1.2' ); |
26 | $thumbpath = image_resize( $file, $max_side, $max_side ); |
27 | return apply_filters( 'wp_create_thumbnail', $thumbpath ); |
28 | } |
29 |
|
30 | /** |
31 | * Crop an Image to a given size. |
32 | * |
33 | * @since 2.1.0 |
34 | * |
35 | * @param string|int $src_file The source file or Attachment ID. |
36 | * @param int $src_x The start x position to crop from. |