wp_image_resize_identical_dimensions хук-фильтр . WP 5.3.0
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.
Использование
add_filter( 'wp_image_resize_identical_dimensions', 'filter_function_name_3673', 10, 3 ); function filter_function_name_3673( $proceed, $orig_w, $orig_h ){ // filter... return $proceed; }
- $proceed(true/false)
- The filtered value.
- $orig_w(число)
- Original image width.
- $orig_h(число)
- Original image height.
Список изменений
С версии 5.3.0 | Введена. |
Где вызывается хук
wp_image_resize_identical_dimensions
wp-includes/media.php 648
$proceed = (bool) apply_filters( 'wp_image_resize_identical_dimensions', false, $orig_w, $orig_h );