[wp-hackers] The WordPress way to store temporary per user data (sessions)?

Kevin Newman CaptainN at unFocus.com
Wed Sep 15 22:12:56 UTC 2010


  On 9/15/10 6:08 PM, Jeremy Clarke wrote:
> For the record, here is the transients api Codex article:
>
> http://codex.wordpress.org/Transients_API
>
> Useful for any temporary data saving. Works just like the options api but
> they get cleared out after a set amount of time. To save temporary user data
> you could save transients with names that identify the user.
>
Cool, I'll check that out.

It looks like some folks on the forums are just using regular php session:

if( !isset( $_SESSION ) ) { // play nice with other plugins
     session_start();
}

I was just wondering if there's an easy way to do that in WP.

Thanks,

Kevin N.




More information about the wp-hackers mailing list