Skip to content

Commit

Permalink
updated button variable
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekfdd committed Aug 22, 2022
1 parent 6984ca5 commit 2b2759f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/google-login-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
return;
}

$logout_url = '';
$button_url = $login_url;

if ( is_user_logged_in() ) {
$button_text = __( 'Log out', 'login-with-google' );
$logout_url = wp_logout_url( get_permalink() );
$button_url = wp_logout_url( get_permalink() );
}
?>
<div class="wp_google_login">
<div class="wp_google_login__button-container">
<a class="wp_google_login__button"
<?php
printf( ' href="%s"', esc_url( $logout_url ) );
printf( ' href="%s"', esc_url( $button_url ) );
?>
>
<span class="wp_google_login__google-icon"></span>
Expand Down

0 comments on commit 2b2759f

Please sign in to comment.