WordPress.org

Make WordPress Core

Ticket #22852: islogin.22852.diff

File islogin.22852.diff, 634 bytes (added by robmiller, 5 years ago)
  • wp-includes/load.php

    diff --git wp-includes/load.php wp-includes/load.php
    index 1742af4..80441f3 100644
    function is_admin() { 
    592592}
    593593
    594594/**
     595 * Whether the current request is for the login or register pages
     596 *
     597 * @since 3.6
     598 *
     599 * return bool True if on the login/register page
     600 */
     601function is_login() {
     602        return !empty($GLOBALS['pagenow']) && in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));
     603}
     604
     605/**
    595606 * Whether the current request is for a blog admin screen /wp-admin/
    596607 *
    597608 * Does not inform on whether the user is a blog admin! Use capability checks to