WP_Image_Editor::multi_resize()publicWP 3.5.0

Resize multiple images from a single source.

Метод класса: WP_Image_Editor{}

Хуков нет.

Возвращает

Массив. An array of resized images metadata by size.

Использование

$WP_Image_Editor = new WP_Image_Editor();
$WP_Image_Editor->multi_resize( $sizes );
$sizes(массив) (обязательный)

An array of image size arrays.

По умолчанию: sizes are 'small', 'medium', 'large'

  • ...$0(массив)

    • width(int)
      Image width.

    • height(int)
      Image height.

    • crop(true|false|массив)
      Optional. Whether to crop the image.
      По умолчанию: false

Список изменений

С версии 3.5.0 Введена.

Код WP_Image_Editor::multi_resize() WP 6.5.2

abstract public function multi_resize( $sizes );