[wp-trac] [WordPress Trac] #19898: Create an is_login_screen() function similar to is_admin()

WordPress Trac noreply at wordpress.org
Tue Sep 20 21:20:41 UTC 2022


#19898: Create an is_login_screen() function similar to is_admin()
-------------------------------------------------+-------------------------
 Reporter:  dcowgill                             |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.1
Component:  Login and Registration               |     Version:  3.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-dev-note 2nd-        |     Focuses:
  opinion                                        |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * keywords:  has-patch needs-dev-note => has-patch needs-dev-note 2nd-
               opinion
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Going to reopen this as it seems the `is_login_screen()` function name may
 be a bit confusing in some cases and perhaps can be better. Note that this
 is only for reconsidering part of the name, can be fixed during beta.

 Would the function name be better as `is_login()` or maybe
 `is_login_request()`, perhaps?

 What the `screen` suffix means doesn't seem particularly clear imho. In
 plain language the return value of that function means that:

 1. The request is from an user that has not been authenticated.
 2. The request may be a redirect from another wp-admin page.
 3. The WordPress login screen will likely be outputted as a result of this
 request. However if the request was from something like the WP Login
 widget, or from AJAX, the screen will not be outputted.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/19898#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list