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 |
---|---|
62 | imagecopyresampled( $dst, $src, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); |
63 |
|
64 | imagedestroy( $src ); // Free up memory |
65 |
|
66 | if ( ! $dst_file ) |
67 | $dst_file = str_replace( basename( $src_file ), 'cropped-' . basename( $src_file ), $src_file ); |
68 |
|
69 | $dst_file = preg_replace( '/\\.[^\\.]+$/', '.jpg', $dst_file ); |
70 |
|
71 | if ( imagejpeg( $dst, $dst_file, apply_filters( 'jpeg_quality', 90, 'wp_crop_image' ) ) ) |
72 | return $dst_file; |
73 | else |
74 | return false; |
75 | } |
76 |
|
77 | /** |
78 | * Generate post image attachment meta data. |
79 | * |
80 | * @since 2.1.0 |