From 66bcd8552931489a5d70fc09eadf2266321e59ab Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 11 Jun 2014 16:33:15 +0000 Subject: [PATCH] Improve inline documention for `set_transient()` and `set_site_transient()` to specify the 45- and 40-character limits for their respective transient name values. Props edwin-at-studiojoyo.com for the original patch. See #15058, #13310. Fixes #28467. Built from https://develop.svn.wordpress.org/trunk@28735 git-svn-id: http://core.svn.wordpress.org/trunk@28549 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/option.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index 1cf3e66c12..3fccda2a0c 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -620,9 +620,11 @@ function get_transient( $transient ) { * * @since 2.8.0 * - * @param string $transient Transient name. Expected to not be SQL-escaped. - * @param mixed $value Transient value. Must be serializable if non-scalar. Expected to not be SQL-escaped. - * @param int $expiration Time until expiration in seconds, default 0 + * @param string $transient Transient name. Expected to not be SQL-escaped. Must be + * 45 characters or fewer in length. + * @param mixed $value Transient value. Must be serializable if non-scalar. + * Expected to not be SQL-escaped. + * @param int $expiration Optional. Time until expiration in seconds. Default 0. * @return bool False if value was not set and true if value was set. */ function set_transient( $transient, $value, $expiration = 0 ) { @@ -1360,9 +1362,10 @@ function get_site_transient( $transient ) { * * @see set_transient() * - * @param string $transient Transient name. Expected to not be SQL-escaped. - * @param mixed $value Transient value. Expected to not be SQL-escaped. - * @param int $expiration Time until expiration in seconds, default 0 + * @param string $transient Transient name. Expected to not be SQL-escaped. Must be + * 40 characters or fewer in length. + * @param mixed $value Transient value. Expected to not be SQL-escaped. + * @param int $expiration Optional. Time until expiration in seconds. Default 0. * @return bool False if value was not set and true if value was set. */ function set_site_transient( $transient, $value, $expiration = 0 ) {