WordPress.org

Making WordPress.org


Ignore:
Timestamp:
02/17/2018 12:14:14 PM (18 months ago)
Author:
ocean90
Message:

WordPress.org SSO: Don't append the current locale if on SSO host.

See #1673.

File:
1 edited

Legend:

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

    r6661 r6676  
    5555                add_filter( 'pre_site_option_registration', array( $this, 'inherit_registration_option' ) );
    5656
    57                 add_filter( 'login_url', [$this, 'add_locale'], 21 );
    58                 add_filter( 'register_url', [$this, 'add_locale'], 21 );
    59                 add_filter( 'lostpassword_url', [$this, 'add_locale'], 21 );
     57                if ( ! $this->is_sso_host() ) {
     58                    add_filter( 'login_url', [ $this, 'add_locale' ], 21 );
     59                    add_filter( 'register_url', [ $this, 'add_locale' ], 21 );
     60                    add_filter( 'lostpassword_url', [ $this, 'add_locale' ], 21 );
     61                }
    6062            }
    6163        }
     
    162164                $this->_safe_redirect( add_query_arg( 'redirect_to', urlencode( $redirect_req ), $this->sso_signup_url ) );
    163165
    164             } elseif ( self::SSO_HOST !== $this->host ) {
     166            } elseif ( ! $this->is_sso_host() ) {
    165167                // If we're not on the SSO host
    166168                if ( preg_match( '!/wp-login\.php$!', $this->script ) ) {
Note: See TracChangeset for help on using the changeset viewer.