Created
September 26, 2017 03:10
-
-
Save rahularyan/bf9c4477ce58c42d5e6fac6a3ffcc716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Login dropdown in header. | |
* @since 2.0 | |
*/ | |
?> | |
<ul id="login-sign" class="nav navbar-nav navbar-right"> | |
<li class="dropdown"> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php _e('Login', 'ab'); ?></a> | |
<div class="dropdown-menu"> | |
<?php | |
/** | |
* Show wordpress social login buttons. | |
*/ | |
?> | |
<?php if( do_action( 'wordpress_social_login' ) ): ?> | |
<div class="social-login-c clearfix"> | |
<h4><?php _e('Log in using', 'ab'); ?></h4> | |
<?php do_action( 'wordpress_social_login' ); ?> | |
</div> | |
<?php endif; ?> | |
<div class="login-c clearfix"> | |
<?php | |
$form = wp_login_form(array('echo' => false)); | |
$form = str_replace('login-username', 'login-username form-group', $form); | |
$form = str_replace('login-password', 'login-password form-group', $form); | |
$form = str_replace('login-remember', 'login-submit form-group', $form); | |
$form = str_replace('button-primary', 'btn btn-success', $form); | |
$form = str_replace('</p> | |
<p class="login-submit">', '', $form); | |
$form = str_replace('<p', '<div', $form); | |
$form = str_replace('</p>', '</div>', $form); | |
$form = str_replace('class="input"', 'class="form-control"', $form); | |
$form = str_replace('id="user_login"', 'id="user_login" placeholder="'.__('Enter your username', 'ab').'"', $form); | |
$form = str_replace('id="user_pass"', 'id="user_pass" placeholder="'.__('Enter your password', 'ab').'"', $form); | |
echo $form; | |
?> | |
<a href="<?php echo wp_lostpassword_url( ); ?>" class="forget-btn"><?php _e('Rest password', 'ab'); ?></a> | |
<a href="<?php echo wp_registration_url(); ?>" class="signup-btn btn btn-primary"><?php _e('New to this site? Register', 'ab'); ?></a> | |
</div> | |
</div> | |
</li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment