WC_Regenerate_Images_Request::adjust_intermediate_image_sizes()
Returns the sizes we want to regenerate.
Метод класса: WC_Regenerate_Images_Request{}
Хуки из метода
Возвращает
Массив
.
Использование
$WC_Regenerate_Images_Request = new WC_Regenerate_Images_Request(); $WC_Regenerate_Images_Request->adjust_intermediate_image_sizes( $sizes );
- $sizes(массив) (обязательный)
- Sizes to generate.
Код WC_Regenerate_Images_Request::adjust_intermediate_image_sizes() WC Regenerate Images Request::adjust intermediate image sizes WC 9.2.3
public function adjust_intermediate_image_sizes( $sizes ) { // Prevent a filter loop. $unfiltered_sizes = array( 'woocommerce_thumbnail', 'woocommerce_gallery_thumbnail', 'woocommerce_single' ); static $in_filter = false; if ( $in_filter ) { return $unfiltered_sizes; } $in_filter = true; $filtered_sizes = apply_filters( 'woocommerce_regenerate_images_intermediate_image_sizes', $unfiltered_sizes ); $in_filter = false; return $filtered_sizes; }