Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_create_thumbnail

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

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