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 |
|---|---|
| 93 | |
| 94 | } |
| 95 | } else { |
| 96 | $error = __( 'File not found' ); |
| 97 | } |
| 98 | |
| 99 | if (!empty ( $error ) ) { |
| 100 | return $error; |
| 101 | } else { |
| 102 | return apply_filters( 'wp_create_thumbnail', $thumbpath ); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { |
| 107 | if ( ctype_digit( $src_file ) ) // Handle int as attachment ID |
| 108 | $src_file = get_attached_file( $src_file ); |
| 109 | |
| 110 | $src = wp_load_image( $src_file ); |
| 111 | |