Removing Login Fields From Justin Kliens WP-Facebook-Autoconnect

First of all I would like to say thanks to Justin for the plugin, it saved me some time :)
You can find his easy to use plugin at his personal blog site: http://www.justin-klein.com/projects/wp-fb-autoconnect/

This modification will work with Version 1.3.10

After about half an hour I was able to find the code that was causing a second duplicate login and password field. I am sure Justin was thinking ahead with the login fields but in some cases it actually interferes with the blog design/UI. The other problem was the welcome and edit profile links once logged in.

The block of code is found in 2 sections within Widget.php

The First NULLED section will remove the Welcome and Edit profile links once a user is logged in.
The Second NULLED section of code will remove the login fields.

Widget.php
Note: you can copy and past this entire code onto your Widget.php file to update it or download the file directly from the link at the bottom of this post.
[cc lang=”php”]
WP_Widget( false, “WP-FB AutoConnect”, array( ‘description’ => ‘A sidebar Login/Logout form with Facebook Connect button’ ) );

}

//////////////////////////////////////////////////////

//Output the widget’s content.

function widget( $args, $instance )

{

//Get args and output the title

extract( $args );

echo $before_widget;

$title = apply_filters(‘widget_title’, $instance[‘title’]);

if( $title ) echo $before_title . $title . $after_title;

//If logged in, show “Welcome, User!”

$userdata = wp_get_current_user();

if( $userdata->ID ):

?>


########################################################################
########################################################################
########################################################################

NULLED TO PREVENT THE WELCOME MESSAGE ONCE THE USE IS LOGGED IN–>

display_name?>!

|

## END OF NULL <-- */?>

/wp-login.php’ method=’post’>

“;?>

‘>

##END OF NULL <-- */?>

If this too much code for you and you just want the login fields gone download the following files and replace the ones in your x:/wp-content/plugins/wp-fb-autoconnect folder.

Download Files

Published by

Miguel

I am a bilingual Network Engineer with over 20 years of professional experience in computer science and information technology. I am the founder and operator of Web Semantics, based in Vancouver, Washington, where I design, secure, and manage enterprise-grade infrastructure for small and mid-sized businesses across the West Coast. I provide bilingual IT support in English and Spanish, specializing in network architecture, systems engineering, security, and operational resilience. Soy un ingeniero de redes bilingüe con más de 20 años de experiencia profesional en ciencias de la computación y tecnología de la información. Soy fundador y operador de Web Semantics, con sede en Vancouver, Washington, donde diseño, protejo y administro infraestructura empresarial para pequeñas y medianas empresas en la costa oeste. Ofrezco soporte de IT bilingüe en inglés y español, con especialización en arquitectura de redes, ingeniería de sistemas, seguridad y resiliencia operativa.