Making WordPress.org


Ignore:
Timestamp:
02/04/2020 12:16:34 AM (4 years ago)
Author:
dd32
Message:

Login: Add a Canonical header to the login screens.

Fixes #5004.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/wporg-sso/wp-plugin.php

    r9459 r9461  
    3333
    3434        /**
     35         * Holds the route regex hit in `valid_sso_paths`
     36         * @var bool|string
     37         */
     38        static $matched_route_regex = false;
     39
     40        /**
    3541         * Holds any matched route params.
    3642         * @var array
     
    211217                if ( ! preg_match( '!/wp-login\.php$!', $this->script ) ) {
    212218                    // ... but not on its login screen.
    213                     self::$matched_route = false;
     219                    self::$matched_route        = false;
     220                    self::$matched_route_regex  = false;
    214221                    self::$matched_route_params = array();
    215222                    foreach ( $this->valid_sso_paths as $route => $regex ) {
    216223                        if ( preg_match( '!^' . $regex . '(?:[/?]{1,2}.*)?$!', $_SERVER['REQUEST_URI'], $matches ) ) {
    217                             self::$matched_route = $route;
     224                            self::$matched_route        = $route;
     225                            self::$matched_route_regex  = $regex;
    218226                            self::$matched_route_params = $matches;
    219227                            break;
Note: See TracChangeset for help on using the changeset viewer.