WPDev.one
Core Function
View Source on Trac ↗

set_site_transient()

set_site_transient( mixed $transient, mixed $value, mixed $expiration = 0 )

Sets/updates the value of a site transient.

Parameters 2 required

Name / Type Description
string

$transient Transient name. Expected to not be SQL-escaped. Must be 167 characters or fewer in length.

Required
$value
mixed

Transient value. Expected to not be SQL-escaped.

Required
$expiration
int

Optional. Time until expiration in seconds. Default 0 (no expiration).

Return Value

(bool)
True if the value was set, false otherwise.

Function Information

Since Version
2.9.0
Source File
wp-includes/option.php
Advertisement