From d9ddb0bb9b881d99923828242849992c2e0ecc3d Mon Sep 17 00:00:00 2001 From: Eugene Manuilov Date: Sun, 22 Dec 2024 14:30:58 +0100 Subject: [PATCH 1/5] Add the library_name property. --- includes/Modules/Sign_In_With_Google.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/Modules/Sign_In_With_Google.php b/includes/Modules/Sign_In_With_Google.php index 012606e2bcd..fb0cbecbf02 100644 --- a/includes/Modules/Sign_In_With_Google.php +++ b/includes/Modules/Sign_In_With_Google.php @@ -352,6 +352,7 @@ private function render_signin_button() { google.accounts.id.initialize( { client_id: '', callback: handleCredentialResponse, + library_name: 'Site-Kit', } ); google.accounts.id.renderButton( parent, ); From 65b63c7d78e8c095c96a49af8e079d0db384fe59 Mon Sep 17 00:00:00 2001 From: Eugene Manuilov Date: Sun, 22 Dec 2024 17:59:18 +0100 Subject: [PATCH 2/5] Update the closing comment to be not translatable. --- includes/Modules/Sign_In_With_Google.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Modules/Sign_In_With_Google.php b/includes/Modules/Sign_In_With_Google.php index fb0cbecbf02..25e6a45fb0a 100644 --- a/includes/Modules/Sign_In_With_Google.php +++ b/includes/Modules/Sign_In_With_Google.php @@ -321,7 +321,7 @@ private function render_signin_button() { // Purposely not translated as this is a technical comment. // // See: https://github.com/google/site-kit-wp/pull/9826#discussion_r1876026945. - "\n\n" + '\n\n' ); BC_Functions::wp_print_script_tag( array( 'src' => 'https://accounts.google.com/gsi/client' ) ); ob_start(); @@ -369,7 +369,7 @@ private function render_signin_button() { } )(); \n", esc_html__( 'End Sign in with Google button added by Site Kit', 'google-site-kit' ) ); + print( '\n\n' ); } /** From 48b5641f0b3db4189da5801d56d65f07eaf8d6c0 Mon Sep 17 00:00:00 2001 From: Eugene Manuilov Date: Sun, 22 Dec 2024 18:06:12 +0100 Subject: [PATCH 3/5] Fix formatting issues. --- includes/Modules/Sign_In_With_Google.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Modules/Sign_In_With_Google.php b/includes/Modules/Sign_In_With_Google.php index 25e6a45fb0a..cb00e28530d 100644 --- a/includes/Modules/Sign_In_With_Google.php +++ b/includes/Modules/Sign_In_With_Google.php @@ -340,7 +340,7 @@ private function render_signin_button() { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams( response ) - }); + } ); if ( res.ok && res.redirected ) { location.assign( res.url ); } From 7e6157a9cac6965873a66fbc7d544b16240c71fe Mon Sep 17 00:00:00 2001 From: Matthew Riley MacPherson Date: Mon, 23 Dec 2024 16:45:45 +0000 Subject: [PATCH 4/5] Revert quote changes. --- includes/Modules/Sign_In_With_Google.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Modules/Sign_In_With_Google.php b/includes/Modules/Sign_In_With_Google.php index cb00e28530d..d13a6119924 100644 --- a/includes/Modules/Sign_In_With_Google.php +++ b/includes/Modules/Sign_In_With_Google.php @@ -321,7 +321,7 @@ private function render_signin_button() { // Purposely not translated as this is a technical comment. // // See: https://github.com/google/site-kit-wp/pull/9826#discussion_r1876026945. - '\n\n' + "\n\n" ); BC_Functions::wp_print_script_tag( array( 'src' => 'https://accounts.google.com/gsi/client' ) ); ob_start(); From a09391850dd416262a3837441ec6ddf2fd01933b Mon Sep 17 00:00:00 2001 From: Matthew Riley MacPherson Date: Mon, 23 Dec 2024 16:46:02 +0000 Subject: [PATCH 5/5] Revert quote changes. --- includes/Modules/Sign_In_With_Google.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Modules/Sign_In_With_Google.php b/includes/Modules/Sign_In_With_Google.php index d13a6119924..fa2e0cc2a7d 100644 --- a/includes/Modules/Sign_In_With_Google.php +++ b/includes/Modules/Sign_In_With_Google.php @@ -369,7 +369,7 @@ private function render_signin_button() { } )(); \n' ); + print( "\n\n" ); } /**