Show login & logout links.
Link + redirect to current page = true
:
Logged in:
<div class="logged-in wp-block-loginout"><a href="https://blocks.joedolson.com/wp-login.php?action=logout&redirect_to=https%3A%2F%2Fblocks.joedolson.com%2F2022%2F09%2F06%2Fcore-loginout%2F%3Fpreview_id%3D319%26preview_nonce%3Dcfce856273%26preview%3Dtrue&_wpnonce=9ce423bbc7">Log out</a></div>
Logged out:
<div class="logged-out wp-block-loginout"><a href="https://blocks.joedolson.com/wp-login.php?redirect_to=https%3A%2F%2Fblocks.joedolson.com%2F2022%2F09%2F06%2Fcore-loginout%2F">Log in</a></div>
Link + redirect to current page = false
:
Logged in:
<div class="logged-in wp-block-loginout"><a href="https://blocks.joedolson.com/wp-login.php?action=logout&_wpnonce=9ce423bbc7">Log out</a></div>
Logged out:
<div class="logged-out wp-block-loginout"><a href="https://blocks.joedolson.com/wp-login.php">Log in</a></div>
Form + redirect to current page = true
:
Logged in:
<div class="logged-in wp-block-loginout"><a href="https://blocks.joedolson.com/wp-login.php?action=logout&redirect_to=https%3A%2F%2Fblocks.joedolson.com%2F2022%2F09%2F06%2Fcore-loginout%2F%3Fpreview_id%3D319%26preview_nonce%3Dcfce856273%26preview%3Dtrue&_wpnonce=9ce423bbc7">Log out</a></div>
Logged out:
<div class="logged-out has-login-form wp-block-loginout"><form name="loginform" id="loginform" action="https://blocks.joedolson.com/wp-login.php" method="post"><p class="login-username">
<label for="user_login">Username or Email Address</label>
<input type="text" name="log" id="user_login" autocomplete="username" class="input" value="" size="20">
</p><p class="login-password">
<label for="user_pass">Password</label>
<input type="password" name="pwd" id="user_pass" autocomplete="current-password" spellcheck="false" class="input" value="" size="20">
</p><p class="login-remember"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever"> Remember Me</label></p><p class="login-submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary" value="Log In">
<input type="hidden" name="redirect_to" value="https://blocks.joedolson.com/2022/09/06/core-loginout/">
</p></form></div>
Form + redirect to current page = false
:
Logged in:
<div class="logged-in wp-block-loginout"><a href="https://blocks.joedolson.com/wp-login.php?action=logout&_wpnonce=9ce423bbc7">Log out</a></div>
Logged out:
<div class="logged-out has-login-form wp-block-loginout"><form name="loginform" id="loginform" action="https://blocks.joedolson.com/wp-login.php" method="post"><p class="login-username">
<label for="user_login">Username or Email Address</label>
<input type="text" name="log" id="user_login" autocomplete="username" class="input" value="" size="20">
</p><p class="login-password">
<label for="user_pass">Password</label>
<input type="password" name="pwd" id="user_pass" autocomplete="current-password" spellcheck="false" class="input" value="" size="20">
</p><p class="login-remember"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever"> Remember Me</label></p><p class="login-submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary" value="Log In">
<input type="hidden" name="redirect_to" value="https://blocks.joedolson.com/2022/09/06/core-loginout/">
</p></form></div>