wp_image_resize_identical_dimensions
Filter HookDescription
Filters whether to proceed with making an image sub-size with identical dimensions with the original/source image. Differences of 1px may be due to rounding and are ignored.Hook Information
File Location |
wp-includes/media.php
View on GitHub
|
Hook Type | Filter |
Line Number | 661 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$proceed
|
The filtered value. |
int
|
$orig_w
|
Original image width. |
int
|
$orig_h
|
Original image height. |
Usage Examples
Basic Usage
<?php
// Hook into wp_image_resize_identical_dimensions
add_filter('wp_image_resize_identical_dimensions', 'my_custom_filter', 10, 3);
function my_custom_filter($proceed, $orig_w, $orig_h) {
// Your custom filtering logic here
return $proceed;
}
Source Code Context
wp-includes/media.php:661
- How this hook is used in WordPress core
<?php
656 *
657 * @param bool $proceed The filtered value.
658 * @param int $orig_w Original image width.
659 * @param int $orig_h Original image height.
660 */
661 $proceed = (bool) apply_filters( 'wp_image_resize_identical_dimensions', false, $orig_w, $orig_h );
662
663 if ( ! $proceed ) {
664 return false;
665 }
666 }
PHP Documentation
<?php
/**
* Filters whether to proceed with making an image sub-size with identical dimensions
* with the original/source image. Differences of 1px may be due to rounding and are ignored.
*
* @since 5.3.0
*
* @param bool $proceed The filtered value.
* @param int $orig_w Original image width.
* @param int $orig_h Original image height.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/media.php
Related Hooks
Related hooks will be displayed here in future updates.