Skip to content

Commit

Permalink
Create login_form_callback.php
Browse files Browse the repository at this point in the history
  • Loading branch information
garora committed Aug 29, 2015
1 parent 634acad commit 5f502df
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions shortcodes/login_form_callback.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
if(!is_user_logged_in())
{
$args = array(
'echo' => true,
'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],
'form_id' => 'loginform',
'label_username' => __( 'Username' ),
'label_password' => __( 'Password' ),
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'remember' => true,
'value_username' => '',
'value_remember' => false
);

wp_login_form( $args );
}
else
{
echo "You are already logged in";
}
?>

0 comments on commit 5f502df

Please sign in to comment.