session - Wordpress $_SESSION not working even after adding add_action('init, '...',1) -


i'm trying make session works wordpress can't work added below code plugin nothing happen:

add_action('init', 'simplesessionstart', 1); add_action('wp_logout', 'simplesessiondestroy'); add_action('wp_login', 'simplesessiondestroy');  function simplesessionstart() {     if(!session_id())session_start(); }  function simplesessiondestroy() {     session_destroy (); } 

how can make $_session passing date 1 page in wordpress site

my wordpress version is: 3.5.2

my theme is: twentyeleven

place code in functions.php file

function sess_start() {     if (!session_id())     session_start(); } add_action('init','sess_start'); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -