Theme_Installer_Skin::hide_process_failed()publicWP 5.5.0

Hides the process_failed error when updating a theme by uploading a zip file.

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

Хуков нет.

Возвращает

true|false. True if the error should be hidden, false otherwise.

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

$Theme_Installer_Skin = new Theme_Installer_Skin();
$Theme_Installer_Skin->hide_process_failed( $wp_error );
$wp_error(WP_Error) (обязательный)
WP_Error object.

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

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

Код Theme_Installer_Skin::hide_process_failed() WP 6.5.2

public function hide_process_failed( $wp_error ) {
	if (
		'upload' === $this->type &&
		'' === $this->overwrite &&
		$wp_error->get_error_code() === 'folder_exists'
	) {
		return true;
	}

	return false;
}