Changeset 7689
- Timestamp:
- 09/21/2018 06:16:25 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/wporg-sso/class-wporg-sso.php
r6835 r7689 62 62 * Returns the SSO login URL, with redirect_to as requested, if deemed valid. 63 63 * 64 * @param string $ redirect_to65 * @param string $ filter_redirect_to When used with the WP login_url filter, the redirect_to is passed as a 2nd arg instead.64 * @param string $login_url 65 * @param string $redirect_to When used with the WP login_url filter, the redirect_to is passed as a 2nd arg instead. 66 66 * @return string 67 67 * 68 * @example Use directly, or through add_action( 'login_url', array( &$wporg_sso, 'login_url' ), 10, 2 );68 * @example Use through add_action( 'login_url', array( $wporg_sso, 'login_url' ), 10, 2 ); 69 69 */ 70 public function login_url( $ redirect_to = '', $filter_redirect_to = '' ) {70 public function login_url( $login_url = '', $redirect_to = '' ) { 71 71 $login_url = $this->sso_login_url; 72 // If 2nd arg is passed, then redirect_to is it. 73 if ( ! empty( $filter_redirect_to ) ) { 74 $redirect_to = $filter_redirect_to; 75 } 72 76 73 if ( ! empty( $redirect_to ) && $this->_is_valid_targeted_domain( $redirect_to ) ) { 77 74 $redirect_to = preg_replace( '/\/wp-(login|signup)\.php\??.*$/', '/', $redirect_to ); 78 75 $login_url = add_query_arg( 'redirect_to', urlencode( $redirect_to ), $login_url ); 79 76 } 77 80 78 return $login_url; 81 79
Note: See TracChangeset
for help on using the changeset viewer.