• Resolved container

    (@container)


    A new function named is_login() has been added after version 6.1 of wordpress.
    https://developer.www.ads-software.com/reference/functions/is_login/

    It is located at wp-includes/load.php:1152 as shown above, and the source code is
    return false ! == stripos( wp_login_url(), $_SERVER[‘SCRIPT_NAME’] );

    When the plugin is on, is_login() does not work. It cannot properly determine if the user is on the login page.

    I looked at the source code output of is_login() and found the following problem.

    The function “wp_login_url()” works fine. He will return the full login link after redirection.
    For example: https://your-domain.com/custom-login

    But “$_SERVER[‘SCRIPT_NAME’]” does not work properly. It always returns “/index.php” instead of “/custom-login” even if the user is on the login page.

    So the is_login() function only returns false even if the user is on the login page, which seems to be a problem that needs to be fixed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support MaximeWPS

    (@seinomedia)

    Hello,

    Thanks for using WPS Hide Login.

    Try this function is_user_logged_in() rather than is_login().

    Thread Starter container

    (@container)

    No, that’s not true

    is_ user_ logged_ In () is used to detect whether a user is logged in.

    While is_ Login () is used to detect whether the user is on the login page.

    Their functions are completely different.

    @container is right. Please add functionality that will extend is_login(), or mimick it, since other plugins may rely on it.

    Plugin Support MaximeWPS

    (@seinomedia)

    Hello,

    You’re both right. I didn’t read enough carefully the first post. Please, excuse me.

    I share this notice with ou dev team and will let them work on it.

    Plugin Support MaximeWPS

    (@seinomedia)

    Hello all,

    Our dev team has fixed the issue. Can you try again ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘When the plugin is on, the is_login() function does not work.’ is closed to new replies.