WP_Image_Editor::crop() public WP 3.5.0
Crops Image.
{} Это метод класса: WP_Image_Editor{}
Хуков нет.
Возвращает
true/WP_Error
. Null. Ничего.
Использование
$WP_Image_Editor = new WP_Image_Editor(); $WP_Image_Editor->crop( $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs );
- $src_x(число) (обязательный)
- The start x position to crop from.
- $src_y(число) (обязательный)
- The start y position to crop from.
- $src_w(число) (обязательный)
- The width to crop.
- $src_h(число) (обязательный)
- The height to crop.
- $dst_w(число)
- The destination width.
- $dst_h(число)
- The destination height.
- $src_abs(true/false)
- If the source crop points are absolute.
Список изменений
С версии 3.5.0 | Введена. |
Код WP_Image_Editor::crop() WP Image Editor::crop WP 5.7
abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );