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
This commit is contained in:
Drew Jaynes 2014-06-11 16:33:15 +00:00
parent ecf0e4702f
commit 66bcd85529

View File

@ -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 ) {