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.


git-svn-id: https://develop.svn.wordpress.org/trunk@28735 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes (DrewAPicture) 2014-06-11 16:32:06 +00:00
parent fa03901cd8
commit e535d7fe6e

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