Skip to content

Commit

Permalink
Merge pull request #9931 from google/enhancement/9924-siwg-library-name
Browse files Browse the repository at this point in the history
Enhancement/9924 siwg library name
  • Loading branch information
tofumatt authored Dec 23, 2024
2 parents c32994f + a093918 commit 0db6c72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/Modules/Sign_In_With_Google.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand All @@ -352,6 +352,7 @@ private function render_signin_button() {
google.accounts.id.initialize( {
client_id: '<?php echo esc_js( $settings['clientID'] ); ?>',
callback: handleCredentialResponse,
library_name: 'Site-Kit',
} );

google.accounts.id.renderButton( parent, <?php echo wp_json_encode( $btn_args ); ?> );
Expand All @@ -368,7 +369,7 @@ private function render_signin_button() {
} )();
<?php
BC_Functions::wp_print_inline_script_tag( ob_get_clean() );
printf( "\n<!-- %s -->\n", esc_html__( 'End Sign in with Google button added by Site Kit', 'google-site-kit' ) );
print( "\n<!-- End Sign in with Google button added by Site Kit -->\n" );
}

/**
Expand Down

0 comments on commit 0db6c72

Please sign in to comment.