WC_Regenerate_Images::unfiltered_image_downsize()
Image downsize, without this classes filtering on the results.
Метод класса: WC_Regenerate_Images{}
Хуков нет.
Возвращает
Строку
. New image URL.
Использование
$result = WC_Regenerate_Images::unfiltered_image_downsize( $attachment_id, $size );
- $attachment_id(int) (обязательный)
- Attachment ID.
- $size(строка) (обязательный)
- Size to downsize to.
Код WC_Regenerate_Images::unfiltered_image_downsize() WC Regenerate Images::unfiltered image downsize WC 9.8.1
private static function unfiltered_image_downsize( $attachment_id, $size ) { remove_action( 'image_get_intermediate_size', array( __CLASS__, 'filter_image_get_intermediate_size' ), 10, 3 ); $return = image_downsize( $attachment_id, $size ); add_action( 'image_get_intermediate_size', array( __CLASS__, 'filter_image_get_intermediate_size' ), 10, 3 ); return $return; }