From b4ad76ff794d6aabaadc7bcea92f271df3d7bd65 Mon Sep 17 00:00:00 2001 From: Renan Date: Wed, 24 Jan 2024 21:42:41 +0100 Subject: [PATCH 01/13] Initial implementation of email invitation --- projects/plugins/jetpack/modules/sso.php | 161 +++++++++++++++-------- 1 file changed, 105 insertions(+), 56 deletions(-) diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index 0a2c4956e55b2..03c79ecb64577 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -5,6 +5,7 @@ * @package automattic/jetpack */ +use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Roles; use Automattic\Jetpack\Status; @@ -53,7 +54,8 @@ private function __construct() { add_action( 'jetpack_unlinked_user', array( $this, 'delete_connection_for_user' ) ); add_action( 'jetpack_site_before_disconnected', array( static::class, 'disconnect' ) ); add_action( 'wp_login', array( 'Jetpack_SSO', 'clear_cookies_after_login' ) ); - + add_filter( 'wp_send_new_user_notification_to_user', array( $this, 'intercept_core_invitation_email' ), 10, 2 ); + add_action( 'user_new_form', array( $this, 'render_invitation_email_message' ) ); // Adding this action so that on login_init, the action won't be sanitized out of the $action global. add_action( 'login_form_jetpack-sso', '__return_true' ); @@ -83,6 +85,53 @@ private function __construct() { } } + /** + * Render the invitation email message. + */ + public function render_invitation_email_message() { + printf( '
%1s
', esc_html__( 'The user will be automatically invited to WordPress.com.', 'jetpack' ) ); + } + + /** + * Intercept the core invitation email. + * + * @param bool $notify Whether to notify the user or not. + * @param WP_User $user The user object. + * + * @return bool Whether to notify the user or not. + */ + public function intercept_core_invitation_email( $notify, $user ) { + if ( ! $user instanceof WP_User ) { + return $user; + } + + $email = $user->user_email; + $role = $user->roles[0]; + + $locale = get_user_locale( $user->ID ); + + $blog_id = Jetpack_Options::get_option( 'id' ); + $url = '/sites/' . $blog_id . '/invites/new'; + $url = add_query_arg( 'locale', $locale, $url ); + + Client::wpcom_json_api_request_as_user( + $url, + '2', + array( + 'method' => 'POST', + ), + array( + 'invitees' => array( + array( + 'email_or_username' => $email, + 'role' => $role, + ), + ), + ) + ); + return false; + } + /** * Returns the single instance of the Jetpack_SSO object * @@ -119,7 +168,7 @@ public function sso_reminder_logout_wpcom( $errors ) { if ( ! empty( $errors->errors['loggedout'] ) ) { $logout_message = wp_kses( sprintf( - /* translators: %1$s is a link to the WordPress.com account settings page. */ + /* translators: %1$s is a link to the WordPress.com account settings page. */ __( 'If you are on a shared computer, remember to also log out of WordPress.com.', 'jetpack' ), 'https://wordpress.com/me' ), @@ -320,10 +369,10 @@ public function render_require_two_step() { - + + > - + - + + > - +
- +

- %s', 'jetpack' ), esc_html( $display_name ) ), - array( 'span' => true ) - ); - ?> + %s', 'jetpack' ), esc_html( $display_name ) ), + array( 'span' => true ) + ); + ?>

- +
- build_sso_button( array(), 'is_primary' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping done in build_sso_button() ?> + build_sso_button( array(), 'is_primary' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping done in build_sso_button() ?> - + @@ -610,18 +659,18 @@ public function login_form() {
- +
@@ -637,9 +686,9 @@ public function login_form() { esc_html_e( 'Log in with WordPress.com', 'jetpack' ) ?> - +
- record_user_event( 'sso_login_failed', @@ -991,7 +1040,7 @@ public function handle_login() { add_filter( 'allowed_redirect_hosts', array( 'Jetpack_SSO_Helpers', 'allowed_redirect_hosts' ) ); wp_safe_redirect( - /** This filter is documented in core/src/wp-login.php */ + /** This filter is documented in core/src/wp-login.php */ apply_filters( 'login_redirect', $redirect_to, $_request_redirect_to, $user ) ); exit; @@ -1032,8 +1081,8 @@ public static function profile_page_url() { public function build_sso_button( $args = array(), $is_primary = false ) { $url = $this->build_sso_button_url( $args ); $classes = $is_primary - ? 'jetpack-sso button button-primary' - : 'jetpack-sso button'; + ? 'jetpack-sso button button-primary' + : 'jetpack-sso button'; return sprintf( '%3$s %4$s', From 468a62eee1787ed201fcddf6de7df5e19a654d8c Mon Sep 17 00:00:00 2001 From: Renan Date: Wed, 24 Jan 2024 21:44:43 +0100 Subject: [PATCH 02/13] Initial implementation of email invitation --- projects/plugins/jetpack/modules/sso.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index 03c79ecb64577..c0351d8f329f9 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -56,6 +56,7 @@ private function __construct() { add_action( 'wp_login', array( 'Jetpack_SSO', 'clear_cookies_after_login' ) ); add_filter( 'wp_send_new_user_notification_to_user', array( $this, 'intercept_core_invitation_email' ), 10, 2 ); add_action( 'user_new_form', array( $this, 'render_invitation_email_message' ) ); + // Adding this action so that on login_init, the action won't be sanitized out of the $action global. add_action( 'login_form_jetpack-sso', '__return_true' ); @@ -129,6 +130,7 @@ public function intercept_core_invitation_email( $notify, $user ) { ), ) ); + return false; } From c2c9d1e077816a5034ae92fb16ef819e6bdc922b Mon Sep 17 00:00:00 2001 From: Renan Date: Wed, 24 Jan 2024 21:45:22 +0100 Subject: [PATCH 03/13] changelog --- projects/plugins/jetpack/changelog/improve_invite_form | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/improve_invite_form diff --git a/projects/plugins/jetpack/changelog/improve_invite_form b/projects/plugins/jetpack/changelog/improve_invite_form new file mode 100644 index 0000000000000..1ef8afea050a2 --- /dev/null +++ b/projects/plugins/jetpack/changelog/improve_invite_form @@ -0,0 +1,4 @@ +Significance: patch +Type: other + + From 0afde6d7192e3c14afa11b6994211f0904051c48 Mon Sep 17 00:00:00 2001 From: Renan Date: Thu, 25 Jan 2024 11:20:11 +0100 Subject: [PATCH 04/13] Finishing api call --- projects/plugins/jetpack/modules/sso.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index c0351d8f329f9..be725cba376cf 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -54,6 +54,8 @@ private function __construct() { add_action( 'jetpack_unlinked_user', array( $this, 'delete_connection_for_user' ) ); add_action( 'jetpack_site_before_disconnected', array( static::class, 'disconnect' ) ); add_action( 'wp_login', array( 'Jetpack_SSO', 'clear_cookies_after_login' ) ); + + // When adding a new user via the admin, we want to intercept the core invitation email and send it via WordPress.com. add_filter( 'wp_send_new_user_notification_to_user', array( $this, 'intercept_core_invitation_email' ), 10, 2 ); add_action( 'user_new_form', array( $this, 'render_invitation_email_message' ) ); @@ -99,25 +101,23 @@ public function render_invitation_email_message() { * @param bool $notify Whether to notify the user or not. * @param WP_User $user The user object. * - * @return bool Whether to notify the user or not. + * @return bool Whether to notify the user or not via core email. */ public function intercept_core_invitation_email( $notify, $user ) { if ( ! $user instanceof WP_User ) { return $user; } - $email = $user->user_email; - $role = $user->roles[0]; - - $locale = get_user_locale( $user->ID ); - + $email = $user->user_email; + $role = $user->roles[0]; + $locale = get_user_locale( $user->ID ); $blog_id = Jetpack_Options::get_option( 'id' ); $url = '/sites/' . $blog_id . '/invites/new'; $url = add_query_arg( 'locale', $locale, $url ); Client::wpcom_json_api_request_as_user( $url, - '2', + '2', // Api version array( 'method' => 'POST', ), @@ -130,7 +130,7 @@ public function intercept_core_invitation_email( $notify, $user ) { ), ) ); - + // returning false prevents the user to be notified by the core email. return false; } From 9e805f2c7be3468fe0264b66c3b544226a2150f5 Mon Sep 17 00:00:00 2001 From: Renan Carvalho Date: Thu, 25 Jan 2024 11:47:05 +0100 Subject: [PATCH 05/13] Update improve_invite_form --- projects/plugins/jetpack/changelog/improve_invite_form | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/plugins/jetpack/changelog/improve_invite_form b/projects/plugins/jetpack/changelog/improve_invite_form index 1ef8afea050a2..cc36a216eec77 100644 --- a/projects/plugins/jetpack/changelog/improve_invite_form +++ b/projects/plugins/jetpack/changelog/improve_invite_form @@ -1,4 +1,4 @@ -Significance: patch -Type: other - +Significance: minor +Type: enhancement +SSO: When creating a new user, mail the users with an invitation to WPCom. From 871b50d5a9798ca19873e54f180b0a643e748782 Mon Sep 17 00:00:00 2001 From: Renan Carvalho Date: Thu, 25 Jan 2024 11:54:36 +0100 Subject: [PATCH 06/13] Update changelog --- projects/plugins/jetpack/changelog/improve_invite_form | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/changelog/improve_invite_form b/projects/plugins/jetpack/changelog/improve_invite_form index cc36a216eec77..070491429e8f6 100644 --- a/projects/plugins/jetpack/changelog/improve_invite_form +++ b/projects/plugins/jetpack/changelog/improve_invite_form @@ -1,4 +1,4 @@ Significance: minor Type: enhancement -SSO: When creating a new user, mail the users with an invitation to WPCom. +SSO: When creating a new users, mail the users with an invitation to WPCom. From 7174dcfbfa474e95eabc3188fafd6c7042242edb Mon Sep 17 00:00:00 2001 From: Renan Date: Thu, 25 Jan 2024 14:26:12 +0100 Subject: [PATCH 07/13] Improve user role param --- projects/plugins/jetpack/modules/sso.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index be725cba376cf..c341f84b34139 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -107,9 +107,10 @@ public function intercept_core_invitation_email( $notify, $user ) { if ( ! $user instanceof WP_User ) { return $user; } + $roles = new Roles(); $email = $user->user_email; - $role = $user->roles[0]; + $role = $roles->translate_user_to_role( $user ); $locale = get_user_locale( $user->ID ); $blog_id = Jetpack_Options::get_option( 'id' ); $url = '/sites/' . $blog_id . '/invites/new'; From c4891d3daa8621c2fd33ccb8288b0fca0be0e67f Mon Sep 17 00:00:00 2001 From: Renan Date: Fri, 26 Jan 2024 13:45:06 +0100 Subject: [PATCH 08/13] Handle errors --- projects/plugins/jetpack/modules/sso.php | 36 ++++++++++++++---------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index c341f84b34139..96530737bba1b 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -55,8 +55,10 @@ private function __construct() { add_action( 'jetpack_site_before_disconnected', array( static::class, 'disconnect' ) ); add_action( 'wp_login', array( 'Jetpack_SSO', 'clear_cookies_after_login' ) ); - // When adding a new user via the admin, we want to intercept the core invitation email and send it via WordPress.com. - add_filter( 'wp_send_new_user_notification_to_user', array( $this, 'intercept_core_invitation_email' ), 10, 2 ); + // If the user has no errors on creation, send an invite to WordPress.com. + add_filter( 'user_profile_update_errors', array( $this, 'send_wpcom_mail_user_invite' ), 10, 3 ); + // Don't send core invitation email when adding a new user via the admin. + add_filter( 'wp_send_new_user_notification_to_user', '__return_false' ); add_action( 'user_new_form', array( $this, 'render_invitation_email_message' ) ); // Adding this action so that on login_init, the action won't be sanitized out of the $action global. @@ -96,27 +98,27 @@ public function render_invitation_email_message() { } /** - * Intercept the core invitation email. + * Send user invitation to WordPress.com if user has no errors. * - * @param bool $notify Whether to notify the user or not. - * @param WP_User $user The user object. - * - * @return bool Whether to notify the user or not via core email. + * @param WP_Error $errors The WP_Error object. + * @param bool $update Whether the user is being updated or not. + * @param stdClass $user The User object about to be created. + * @return WP_Error The modified or not WP_Error object. */ - public function intercept_core_invitation_email( $notify, $user ) { - if ( ! $user instanceof WP_User ) { - return $user; + public function send_wpcom_mail_user_invite( $errors, $update, $user ) { + + if ( $errors->has_errors() ) { + return $errors; } - $roles = new Roles(); $email = $user->user_email; - $role = $roles->translate_user_to_role( $user ); + $role = $user->role; $locale = get_user_locale( $user->ID ); $blog_id = Jetpack_Options::get_option( 'id' ); $url = '/sites/' . $blog_id . '/invites/new'; $url = add_query_arg( 'locale', $locale, $url ); - Client::wpcom_json_api_request_as_user( + $response = Client::wpcom_json_api_request_as_user( $url, '2', // Api version array( @@ -131,8 +133,12 @@ public function intercept_core_invitation_email( $notify, $user ) { ), ) ); - // returning false prevents the user to be notified by the core email. - return false; + + if ( 200 !== $response['response']['code'] ) { + $errors->add( 'invitation_not_sent', __( 'Error: "The user invitation email could not be sent, the user account was not created.', 'jetpack' ) ); + } + + return $errors; } /** From a3a82ff03021f2cc141db2c458430fe0dcf3cad7 Mon Sep 17 00:00:00 2001 From: Renan Date: Fri, 26 Jan 2024 15:19:05 +0100 Subject: [PATCH 09/13] Use notice to render message --- projects/plugins/jetpack/modules/sso.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index 96530737bba1b..db0dc76e59f19 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -94,7 +94,14 @@ private function __construct() { * Render the invitation email message. */ public function render_invitation_email_message() { - printf( '
%1s
', esc_html__( 'The user will be automatically invited to WordPress.com.', 'jetpack' ) ); + wp_admin_notice( + __( 'New users will receive an invite to join WordPress.com.', 'jetpack' ), + array( + 'id' => 'invitation_message', + 'type' => 'info', + 'dismissible' => false, + ) + ); } /** From a0b248d39d2aa7d80a5f3492b94f534d6ca1bb70 Mon Sep 17 00:00:00 2001 From: Renan Date: Fri, 26 Jan 2024 17:57:57 +0100 Subject: [PATCH 10/13] Add admin create user stylesheets --- projects/plugins/jetpack/modules/sso.php | 12 ++++++++---- .../modules/sso/jetpack-sso-admin-create-user.css | 9 +++++++++ projects/plugins/jetpack/tools/webpack.config.css.js | 1 + 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index db0dc76e59f19..a8affd40b9988 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -94,12 +94,16 @@ private function __construct() { * Render the invitation email message. */ public function render_invitation_email_message() { + // Enqueue the CSS for the admin create user page. + wp_enqueue_style( 'jetpack-sso-admin-create-user', plugins_url( 'modules/sso/jetpack-sso-admin-create-user.css', JETPACK__PLUGIN_FILE ), array(), time() ); + wp_admin_notice( - __( 'New users will receive an invite to join WordPress.com.', 'jetpack' ), + __( 'New users will receive an invite to join WordPress.com, so they can log in securely using [Secure Sign On].', 'jetpack' ), array( - 'id' => 'invitation_message', - 'type' => 'info', - 'dismissible' => false, + 'id' => 'invitation_message', + 'type' => 'info', + 'dismissible' => false, + 'additional_classes' => array( 'jetpack-sso-admin-create-user-invite-message' ), ) ); } diff --git a/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css b/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css new file mode 100644 index 0000000000000..2981c31a02554 --- /dev/null +++ b/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css @@ -0,0 +1,9 @@ + +.jetpack-sso-admin-create-user-invite-message { + width: 550px; +} +/* Select the second-to-last tr in the table */ +#createuser .form-table tr:nth-last-child(2) { + display: none; +} + diff --git a/projects/plugins/jetpack/tools/webpack.config.css.js b/projects/plugins/jetpack/tools/webpack.config.css.js index a80b1a6f77e21..3c971e87e270f 100644 --- a/projects/plugins/jetpack/tools/webpack.config.css.js +++ b/projects/plugins/jetpack/tools/webpack.config.css.js @@ -178,6 +178,7 @@ for ( const name of [ 'modules/widget-visibility/widget-conditions/widget-conditions', 'modules/widgets/gallery/css/admin', 'modules/sso/jetpack-sso-login', + 'modules/sso/jetpack-sso-admin-create-user', 'modules/masterbar/admin-menu/admin-menu', 'modules/masterbar/admin-menu/admin-menu-nav-unification', ] ) { From f08d7f4ae2eb9b7dfe290d8c4063c400ff9005e4 Mon Sep 17 00:00:00 2001 From: Renan Date: Sat, 27 Jan 2024 09:25:51 +0100 Subject: [PATCH 11/13] Hide unnecessary TR --- .../jetpack/modules/sso/jetpack-sso-admin-create-user.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css b/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css index 2981c31a02554..1abde64f0b7a5 100644 --- a/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css +++ b/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css @@ -2,8 +2,8 @@ .jetpack-sso-admin-create-user-invite-message { width: 550px; } -/* Select the second-to-last tr in the table */ -#createuser .form-table tr:nth-last-child(2) { +/* Hide the checkbox to send WP core invitation emails when SSO is on */ +#createuser .form-table tr:has( #send_user_notification ) { display: none; } From 4bd86440162134903b856e943732e8bb80c6982d Mon Sep 17 00:00:00 2001 From: Renan Date: Sat, 27 Jan 2024 09:31:30 +0100 Subject: [PATCH 12/13] Add link to sso page --- projects/plugins/jetpack/modules/sso.php | 11 +++++++++-- .../modules/sso/jetpack-sso-admin-create-user.css | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index a38ce87346333..e71e37a8efe2b 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -57,7 +57,7 @@ private function __construct() { // If the user has no errors on creation, send an invite to WordPress.com. add_filter( 'user_profile_update_errors', array( $this, 'send_wpcom_mail_user_invite' ), 10, 3 ); - // Don't send core invitation email when adding a new user via the admin. + // Don't send core invitation email when SSO is activated. They will get an email from WP.com. add_filter( 'wp_send_new_user_notification_to_user', '__return_false' ); add_action( 'user_new_form', array( $this, 'render_invitation_email_message' ) ); @@ -219,8 +219,15 @@ public function render_invitation_email_message() { // Enqueue the CSS for the admin create user page. wp_enqueue_style( 'jetpack-sso-admin-create-user', plugins_url( 'modules/sso/jetpack-sso-admin-create-user.css', JETPACK__PLUGIN_FILE ), array(), time() ); + $message = sprintf( + '%s%s', + __( 'New users will receive an invite to join WordPress.com, so they can log in securely using', 'jetpack' ), + 'jetpack-sso-admin-create-user-invite-message-link-sso', + esc_url( 'https://jetpack.com/support/sso/' ), + __( 'Secure Sign On.', 'jetpack' ) + ); wp_admin_notice( - __( 'New users will receive an invite to join WordPress.com, so they can log in securely using [Secure Sign On].', 'jetpack' ), + $message, array( 'id' => 'invitation_message', 'type' => 'info', diff --git a/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css b/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css index 1abde64f0b7a5..41684a072093a 100644 --- a/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css +++ b/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css @@ -6,4 +6,7 @@ #createuser .form-table tr:has( #send_user_notification ) { display: none; } - +.jetpack-sso-admin-create-user-invite-message-link-sso { + margin-left: 3px; + text-decoration: none; +} From 1c3e8bc41c938e38f04a8ac52e3e3a158ab6a5bb Mon Sep 17 00:00:00 2001 From: Renan Date: Mon, 29 Jan 2024 11:11:51 +0100 Subject: [PATCH 13/13] Fix translation --- projects/plugins/jetpack/modules/sso.php | 12 +++++++----- .../modules/sso/jetpack-sso-admin-create-user.css | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/projects/plugins/jetpack/modules/sso.php b/projects/plugins/jetpack/modules/sso.php index e71e37a8efe2b..5e61ae98feec7 100644 --- a/projects/plugins/jetpack/modules/sso.php +++ b/projects/plugins/jetpack/modules/sso.php @@ -220,11 +220,13 @@ public function render_invitation_email_message() { wp_enqueue_style( 'jetpack-sso-admin-create-user', plugins_url( 'modules/sso/jetpack-sso-admin-create-user.css', JETPACK__PLUGIN_FILE ), array(), time() ); $message = sprintf( - '%s%s', - __( 'New users will receive an invite to join WordPress.com, so they can log in securely using', 'jetpack' ), - 'jetpack-sso-admin-create-user-invite-message-link-sso', - esc_url( 'https://jetpack.com/support/sso/' ), - __( 'Secure Sign On.', 'jetpack' ) + // translators: %s is a link to jetpack support site. + __( 'New users will receive an invite to join WordPress.com, so they can log in securely using %s', 'jetpack' ), + sprintf( + '%s', + 'https://jetpack.com/support/sso/', + __( 'Secure Sign On.', 'jetpack' ) + ) ); wp_admin_notice( $message, diff --git a/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css b/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css index 41684a072093a..2b2003a6ec738 100644 --- a/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css +++ b/projects/plugins/jetpack/modules/sso/jetpack-sso-admin-create-user.css @@ -7,6 +7,5 @@ display: none; } .jetpack-sso-admin-create-user-invite-message-link-sso { - margin-left: 3px; text-decoration: none; }