diff --git a/inc/wordpress/namespace.php b/inc/wordpress/namespace.php index b657841..0029462 100644 --- a/inc/wordpress/namespace.php +++ b/inc/wordpress/namespace.php @@ -42,7 +42,10 @@ function load_plugin() { define( 'HM_DELEGATED_AUTH_CLIENT_ID', $config['oauth2-client-id'] ); } - define( 'HM_DELEGATED_AUTH_LOGIN_TEXT', __( 'Login with WordPress SSO', 'altis' ) ); + if ( ! defined( 'HM_DELEGATED_AUTH_LOGIN_TEXT' ) ) { + define( 'HM_DELEGATED_AUTH_LOGIN_TEXT', __( 'Login with WordPress SSO', 'altis' ) ); + } + add_filter( 'delegated_oauth.sync-roles', ( empty( $config['sync-roles'] ) || ! $config['sync-roles'] ) ? '__return_false' : '__return_true' ); require_once Altis\ROOT_DIR . '/vendor/humanmade/delegated-oauth/plugin.php';