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

WordPress Trac noreply at wordpress.org
Tue Feb 12 15:34:48 UTC 2013


#19898: Create a is_login() function similar to is_admin()
-----------------------------------+-----------------------------
 Reporter:  dcowgill               |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Future Release
Component:  Administration         |     Version:  3.3.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+-----------------------------

Comment (by kitchin):

 The proposed patch Attachment 19898.5.diff​ does not work when an
 '''add_action('init', ...)''' callback needs to detect wp-login. In that
 case `@$GLOBALS['pagenow'] == 'wp-login.php'` does work.

 My particular situation is that a plugin author used add_action('init',
 ...) to call session_start(). The session creation is failing due to file
 errors on the server, and I am disabling sessions on the admin side to
 debug.

 Replying to [comment:14 scribu]:
 > It turns out, we can just use `did_action( 'login_form_login' )` and
 `did_action( 'login_form_register' )`.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19898#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list