Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/media.php | apply_filters | 207 | /** * Filters whether to preempt the output of image_downsize(). * * Returning a truthy value from the filter will effectively short-circuit * down-sizing the image, returning that value instead. * * @since 2.5.0 * * @param bool|array $downsize Whether to short-circuit the image downsize. * @param int $id Attachment ID for image. * @param string|int[] $size Requested image size. Can be any registered image size name, or * an array of width and height values in pixels (in that order). */ |
wp-includes/media.php | apply_filters | 4225 | /** This filter is documented in wp-admin/includes/media.php */ $possible_sizes = apply_filters( 'image_size_names_choose', array( 'thumbnail' => __( 'Thumbnail' ), 'medium' => __( 'Medium' ), 'large' => __( 'Large' ), 'full' => __( 'Full Size' ), ) ); unset( $possible_sizes['full'] ); /* * Loop through all potential sizes that may be chosen. Try to do this with some efficiency. * First: run the image_downsize filter. If it returns something, we can use its data. * If the filter does not return something, then image_downsize() is just an expensive way * to check the image metadata, which we do second. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
bool|array | $downsize | Whether to short-circuit the image downsize. |
int | $id | Attachment ID for image. |
string|int[] | $size | Requested image size. Can be any registered image size name, or |
bool|array | $downsize | Whether to short-circuit the image downsize. |
int | $id | Attachment ID for image. |
string|int[] | $size | Requested image size. Can be any registered image size name, or |