WP_Image_Editor_GD::update_size
Sets or updates current image size.
Метод класса: WP_Image_Editor_GD{}
Хуков нет.
Возвращает
true.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->update_size( $width, $height );
- $width(int|null)
- Image width.
По умолчанию:null - $height(int|null)
- Image height.
По умолчанию:null
Список изменений
| С версии 3.5.0 | Введена. |
Код WP_Image_Editor_GD::update_size() WP Image Editor GD::update size WP 7.1.2
protected function update_size( $width = null, $height = null ) {
if ( ! $width ) {
$width = imagesx( $this->image );
}
if ( ! $height ) {
$height = imagesy( $this->image );
}
return parent::update_size( $width, $height );
}