WP_Image_Editor_GD::update_size()protectedWP 3.5.0

Sets or updates current image size.

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

Хуков нет.

Возвращает

true.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->update_size( $width, $height );
$width(int)
-
По умолчанию: false
$height(int)
-
По умолчанию: false

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

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

Код WP_Image_Editor_GD::update_size() WP 6.5.2

protected function update_size( $width = false, $height = false ) {
	if ( ! $width ) {
		$width = imagesx( $this->image );
	}

	if ( ! $height ) {
		$height = imagesy( $this->image );
	}

	return parent::update_size( $width, $height );
}