<?php
/*
Plugin Name: Buddypress Twitstyle Login
Plugin URI:
Description:
Author: Charl Kruger
Author URI:
Version: 1.0
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//add css
function twitstyle_login_header() {
echo '<link rel="stylesheet" type="text/css" href="'.WP_PLUGIN_URL.'/buddypress-twitstyle-login/twitstyle-login.css" media="screen" />'."\n";
}
add_action('wp_head', 'twitstyle_login_header');
//add js
function twitstyle_login_scripts() {
wp_enqueue_script( "buddypress-twitstyle-login", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/twitstyle-login.js"), array( 'jquery' ) );
}
add_action('wp_print_scripts', 'twitstyle_login_scripts');
//the form
function twitstyle() {
?>
<div id="container">
<div id="topnav" class="topnav"> Have an account? <a href="login" class="signin"><span>Sign in</span></a> </div>
<fieldset id="signin_menu">
<form method="post" id="signin" action="https://twitter.com/sessions">
<label for="username">Username or email</label>
<input id="username" name="username" value="" title="username" tabindex="4" type="text">
</p>
<p>
<label for="password">Password</label>
<input id="password" name="password" value="" title="password" tabindex="5" type="password">
</p>
<p class="remember">
<input id="signin_submit" value="Sign in" tabindex="6" type="submit">
<input id="remember" name="remember_me" value="1" tabindex="7" type="checkbox">
<label for="remember">Remember me</label>
</p>
<p class="forgot"> <a href="#" id="resend_password_link">Forgot your password?</a> </p>
<p class="forgot-username"> <A id=forgot_username_link
title="If you remember your password, try logging in with your email"
href="#">Forgot your username?</A> </p>
</form>
</fieldset>
</div>
<?php
}
add_action( 'bp_before_header', 'twitstyle' );
?>