[wp-trac] [WordPress Trac] #56400: Rename is_admin() and related functions for clarity

WordPress Trac noreply at wordpress.org
Thu Sep 22 21:40:27 UTC 2022


#56400: Rename is_admin() and related functions for clarity
--------------------------------+-----------------------------
 Reporter:  SergeyBiryukov      |       Owner:  SergeyBiryukov
     Type:  enhancement         |      Status:  accepted
 Priority:  normal              |   Milestone:  6.1
Component:  Bootstrap/Load      |     Version:
 Severity:  normal              |  Resolution:
 Keywords:  2nd-opinion revert  |     Focuses:
--------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Thanks for the comments!

 Replying to [comment:18 azaozz]:
 > Changing it to `is_admin_request` doesn't make it better and will not
 convey all these meanings. The same is true for `is_login`. I don't agree
 with Nacin's comment there that is may be confusing. It just needs better
 explanation in the docblock.

 I'm happy to revert the aliases for now to allow for more discussion, or
 even close as `wontfix`, but I would like to finalize the naming of
 `is_login()`/`is_login_screen()`/`is_login_request()`, as there was a
 reasonable demand for that function in #19898, specifically implementing a
 [comment:26:ticket:19898 reliable way to detect the login screen].

 Should we rename it to `is_login()`?

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


More information about the wp-trac mailing list