getTransientWithUser() public static method

If the transient does not exist or does not have a value, then the return value will be false.
Since: 1.4.8
public static getTransientWithUser ( string $transient, integer $user_id = null ) : mixed
$transient string Transient name. Expected to not be SQL-escaped
$user_id integer Optional. User ID. If null the current user id is used instead
return mixed Value of transient
コード例 #1
0
ファイル: wpdk-functions.php プロジェクト: wpxtreme/wpdk
 /**
  * Get the value of a user transient.
  * If the transient does not exist or does not have a value, then the return value will be false.
  *
  * @brief      Get
  * @since      1.0.0
  * @deprecated since 1.4.8 - Use WPDKUser::getTransientWithUser() instead
  *
  * @uses       apply_filters() Calls 'pre_user_transient_$transient' hook before checking the transient. Any value
  *             other than false will "short-circuit" the retrieval of the transient and return the returned value.
  * @uses       apply_filters() Calls 'user_transient_$transient' hook, after checking the transient, with the transient
  *             value.
  *
  * @param string $transient Transient name. Expected to not be SQL-escaped
  * @param int    $user_id   Optional. User ID. If null the current user id is used instead
  *
  * @return mixed Value of transient
  */
 function wpdk_get_user_transient($transient, $user_id = null)
 {
     _deprecated_function(__CLASS__ . '::' . __FUNCTION__, '1.4.8', 'WPDKUser::getTransientWithUser()');
     return WPDKUser::getTransientWithUser($transient, $user_id);
 }