WordPress.org

Ready to get started?Download WordPress

Forums

Simple Mobile URL Redirect
[resolved] Redirect Once - less than a day (5 posts)

  1. jberg1
    Member
    Posted 1 year ago #

    Nice plugin. I see you added the "Redirect Once" that sets a cookie. Nice feature, so you can redirect to internal pages. Anyway to have that cookie expire in less than one day? Maybe every hour? So mobile users are redirected, then can surf the site and if they return the same day they are then redirected again.

    http://wordpress.org/extend/plugins/simple-mobile-url-redirect/

  2. Kailey (trepmal)
    Volunteer Mod & Reviewer
    Plugin Author

    Posted 1 year ago #

    Not without changing the plugin code.

    Open mobile-redirect.php. Change intval to floatval on lines 71 and 133.

    With those 2 things changed, you can save a decimal value in the Redirect Once Cookie Expiry option. .04 will be give you just under an hour.

  3. Yusri Mathews
    Member
    Posted 1 year ago #

    Is it not possible to set it to when the session ends?

  4. Kailey (trepmal)
    Volunteer Mod & Reviewer
    Plugin Author

    Posted 1 year ago #

    @iammathews The "Redirect Once Cookie Expiry:" field sets how long the cookie will last for (in days).

    So if set to '7' then the user will be redirected on their first visit, but not again until after the week has passed.

  5. dynamikos
    Member
    Posted 10 months ago #

    Hi There

    I'd also like to set the cookie expiration to an hour but im not having any luck .

    I see there are 3 instances of intval in the mobile-redirect.php. Has the code changed since the last time you helped jberg ?

    Any help will be appreciated .

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.