# delete_site_transient()

URL: https://chugunov.pro/api-wordpress/functions/delete_site_transient/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.9.0.

## Сигнатура

```php
delete_site_transient( string $transient ): bool
```

## Описание

Удаляет транзиент сайта.

## Параметры

- `$transient` `string` — обязательный. Имя транзиента. Ожидается, что не экранировано для SQL.

## Возвращаемое значение

`bool`

## Исходный код

Файл: `wp-includes/option.php:2509`

```php
function delete_site_transient( $transient ) {

	/**
	 * Fires immediately before a specific site transient is deleted.
	 *
	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
	 *
	 * @since 3.0.0
	 *
	 * @param string $transient Transient name.
	 */
	do_action( "delete_site_transient_{$transient}", $transient );

	if ( wp_using_ext_object_cache() || wp_installing() ) {
		$result = wp_cache_delete( $transient, 'site-transient' );
	} else {
		$option_timeout = '_site_transient_timeout_' . $transient;
		$option         = '_site_transient_' . $transient;
		$result         = delete_site_option( $option );

		if ( $result ) {
			delete_site_option( $option_timeout );
		}
	}

	if ( $result ) {

		/**
		 * Fires after a transient is deleted.
		 *
		 * @since 3.0.0
		 *
		 * @param string $transient Deleted transient name.
		 */
		do_action( 'deleted_site_transient', $transient );
	}

	return $result;
}
```

## История изменений

- 2.9.0 — Introduced.

## Связанные

Использует: [`wp_installing`](https://chugunov.pro/api-wordpress/functions/wp_installing/), [`wp_cache_delete`](https://chugunov.pro/api-wordpress/functions/wp_cache_delete/), [`wp_using_ext_object_cache`](https://chugunov.pro/api-wordpress/functions/wp_using_ext_object_cache/), [`delete_site_option`](https://chugunov.pro/api-wordpress/functions/delete_site_option/), [`do_action`](https://chugunov.pro/api-wordpress/functions/do_action/).
Используется в: `WP_Theme::delete_pattern_cache`, [`wp_clean_update_cache`](https://chugunov.pro/api-wordpress/functions/wp_clean_update_cache/), `Core_Upgrader::upgrade`, [`delete_theme`](https://chugunov.pro/api-wordpress/functions/delete_theme/), [`install_plugin_install_status`](https://chugunov.pro/api-wordpress/functions/install_plugin_install_status/), [`wp_clean_plugins_cache`](https://chugunov.pro/api-wordpress/functions/wp_clean_plugins_cache/), [`get_plugins`](https://chugunov.pro/api-wordpress/functions/get_plugins/), [`update_core`](https://chugunov.pro/api-wordpress/functions/update_core/), [`wp_clean_themes_cache`](https://chugunov.pro/api-wordpress/functions/wp_clean_themes_cache/), [`get_theme_roots`](https://chugunov.pro/api-wordpress/functions/get_theme_roots/), `WP_Theme`, `WP_Feed_Cache_Transient::unlink`.

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/delete_site_transient/
