Support » Plugin: Announcer » how do i tell the cookie to reset with each new session?

  • Sjourney

    (@sjourney)


    I’ve been looking at the code and see that the cookie gets reset via the jquery when the announcer is clicked shut.

    Or would I just set a new cookie altogether that would supercede all the programming logic that is in place?

    http://wordpress.org/plugins/announcer/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sjourney

    (@sjourney)

    Research shows that:
    When you use setcookie, you can either set the expiration time to 0 or simply omit the parameter – the cookie will then expire at the end of session (ie, when you close the browser).

    Where would be a strategic place for me to put that piece of code?

    Sjourney

    (@sjourney)

    <crickets />

    had the similar problem – but wanted to make the change cookie life from 1 to 365 days. you can alter line 112 in file public/announcer-js.js
    I changed it from:
    expDate.setDate(expDate.getDate()+1);
    to
    expDate.setDate(expDate.getDate()+365);

    btw, it would be nice if the author of this plugin added cookie life as an option of each announcement.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how do i tell the cookie to reset with each new session?’ is closed to new replies.