• Resolved teeboy4real

    (@teeboy4real)


    Hello,

    I would like to ask if your plugin code will work along with this plugin without any conflict https://ww.wp.xz.cn/plugins/remember-me-controls/

    add_filter( 'auth_cookie_expiration', 'my_custom_cookie_expiration', 10, 3 );
    function my_custom_cookie_expiration( $expiration, $user_id, $remember ) {
    // Extend session to 3 months if "Remember Me" is active
    if ( $remember ) {
    return 3 * MONTH_IN_SECONDS; // 3 months
    }

    // Otherwise, set session duration to 1 month
    return MONTH_IN_SECONDS; // 1 month
    }
Viewing 1 replies (of 1 total)
  • Plugin Author Mustafa Uysal

    (@m_uysl)

    Hi @teeboy4real,

    Are you referring to the snippet or the plugin? Both hook into the auth_cookie_expiration filter, so one could override the other depending on how priorities are set. Right now, both use the default priority of 10, which means it might work—or conflict. You can adjust the priority on the snippet if needed.

    If you plan to use the plugin, I’d suggest sticking with it alone rather than mixing it with other filters that might interfere with auth_cookie_expiration.

    Long story short: yes, the plugin should work, just be careful with overlapping filters.

Viewing 1 replies (of 1 total)

The topic ‘support for remember me controls plugin’ is closed to new replies.