WordPress.org

Support

Support » Plugins and Hacks » Simple Mobile URL Redirect » [Resolved] Redirect Once – less than a day

[Resolved] Redirect Once – less than a day

  • 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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kailey (trepmal)

    @trepmal

    Volunteer Mod & Reviewer

    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.

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

    Plugin Author Kailey (trepmal)

    @trepmal

    Volunteer Mod & Reviewer

    @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.

    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 .

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Redirect Once – less than a day’ is closed to new replies.
Skip to toolbar