diff --git a/options-admin.php b/options-admin.php index ae2a341..2b74fb0 100644 --- a/options-admin.php +++ b/options-admin.php @@ -444,7 +444,7 @@ function shibboleth_options_idps() { $idp ) { - if ($idp_code === '__new') { + if ( '__new' === $idp_code ) { $idp_code_value = ''; } else { $idp_code_value = $idp_code; diff --git a/shibboleth.php b/shibboleth.php index b5e5a17..72762c5 100644 --- a/shibboleth.php +++ b/shibboleth.php @@ -376,11 +376,16 @@ function shibboleth_migrate_old_data() { */ $idps = get_site_option( 'shibboleth_idps', array() ); if ( empty( $idps ) ) { + $button_text = get_site_option( 'shibboleth_button_text', '' ); + if ( 'Log in with Shibboleth' === $button_text ) { + $button_text = ''; + } + $idps['preset'] = array( 'entity_id' => '', 'password_change_url' => get_site_option( 'shibboleth_password_change_url', '' ), 'password_reset_url' => get_site_option( 'shibboleth_password_reset_url', '' ), - 'button_text' => get_site_option( 'shibboleth_button_text', '' ), + 'button_text' => $button_text, ); update_site_option( 'shibboleth_idps', $idps ); delete_site_option( 'shibboleth_password_change_url' ); @@ -704,7 +709,7 @@ function shibboleth_set_user_idp( $user_id, $user_idp = null ) { } } - if ( ! empty( $user_idp )) { + if ( ! empty( $user_idp ) ) { update_user_meta( $user_id, 'shibboleth_account', $user_idp ); return true; } @@ -1134,7 +1139,7 @@ function shibboleth_login_form() { $button_text = __( 'Log in with Shibboleth', 'shibboleth' ); } ?> -
> +
>