• Resolved Harm10

    (@harm10)


    WP offers a function is_login() since version 6.1 to tell that the user is on the login screen.

    When using LoginPress this function is not true when on the LoginPress login screen.

    Can this please be corrected?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Abdul Wahab

    (@abdulwahab610)

    Hey, @harm10

    You are correct that is_login() was introduced in WordPress version 6.1. However, I’d like to better understand your use case to ensure I provide you with the best assistance. Could you please explain in a bit more detail what you are trying to achieve with the is_login() function and how it relates to the LoginPress login screen?

    Specifically:

    1. Are you using is_login() to add custom functionality to your login screen?
    2. Is there a specific issue you are facing when using is_login() with LoginPress?
    3. Any code examples or additional context you can provide would be very helpful.

    Once I have a clearer picture of your requirements, I’ll be happy to look into this further and assist you in resolving the issue.

    Thank you.

    Thread Starter Harm10

    (@harm10)

    I have written several PHP scripts that should do something or not depending on what screen/loop is shown to the user. In this case I manipulate the debug settings when I am on specific loop types.
    An exclusion you see a lot in these kinds of scripts is to skip the function entirely when is_admin() and is_login() is true. Both cases should not trigger a lot of custom scripts.
    Testing my LoginPress staging environment I found that processes got executed when the login screen of LoginPress was shown. Investigation showed that is_login() is false.
    I can imagine that you do not want to “hack” into the WP code so perhaps your own is_LP_login() function?

    Plugin Support Emma

    (@emma24)

    @harm10

    We’d like to understand your specific use case better and investigate this behavior further. Could you please share:

    1. The custom script(s) you are using.
    2. How you are implementing these scripts, specifically any conditions or hooks being applied.

    This will help us replicate the scenario on our end to identify the root cause and provide a solution.

    For a more detailed discussion and quicker assistance, we recommend reaching out to us on our support forum. Our team will be happy to work with you to resolve this issue.

    Looking forward to your response!

    Thread Starter Harm10

    (@harm10)

    @emma24 Thanks for your reply. I think the support forum is only accessible if you register. I think registering to report issues on the WP forum should be enough to get some support?

    Anyway I do not think that an exact example of my script is relevant. Lots of added actions and/or filters use is_admin() to block any unwanted actions when an admin page is displayed. Similar you would like to skip an action (like writing some meta data in the header of the content page) when the login screen is shown. Also interpreting the content of $wp_query for whatever reason is irrelevant when the login screen is displayed.
    Did I detail my issue better in this way?

    Plugin Support Emma

    (@emma24)

    Thank you for elaborating on your request and providing additional context – it’s much appreciated!

    We currently don’t have any such function is_LP_login(). At this time, our primary focus is on preparing some major updates to address key areas, but we’ll keep your feedback in mind for potential future improvements.

    Thread Starter Harm10

    (@harm10)

    @emma24 I understand this is not main priority but I really want to advocate you to hook into the is_login() function of WP and deliver a value of true when the LP login screen is displayed!

    For those who want to know the old method before is_login() was introduced: just check the value in $GLOBALS[‘pagenow’]. If it is wp-login.php then you can consider that the login screen is displayed.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.