Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How can I check if the current page is wp-login.php or wp-signup.php ?

Are there more elegant solutions than using $_SERVER['REQUEST_URI'] ?

share|improve this question

1 Answer 1

up vote 21 down vote accepted

Use the global $pagenow;

if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) )
    run_my_funky_plugin();
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.