function tja_logout() { if ($_GET['action'] == 'logout') { //lagout of facebook if the plugin is activated and the user is a facebook user if (function_exists('fbc_get_fbconnect_user') && fbc_get_fbconnect_user()) { fbc_footer_register('FBConnect.logout();'); } else { wp_logout(); wp_redirect(remove_query_arg('action', $_SERVER['REQUEST_URI'])); } } }
function fbc_comment_form_setup() { if (fbc_get_fbconnect_user()) { echo fbc_render_like(); $blogname = get_option('blogname'); $article_title = ltrim(wp_title($sep = '', $display = false, $seplocation = '')); global $post; $excerpt = strip_tags($post->post_content); $excerpt_len = 1024; if (strlen($excerpt) > $excerpt_len) { $excerpt = substr($excerpt, 0, $excerpt_len) . "..."; } fbc_set_js_var('excerpt', $excerpt); fbc_set_js_var('blog_name', $blogname); fbc_set_js_var('article_title', $article_title); fbc_footer_register("FBConnect.setup_feedform();"); } }
<?php } ?> <?php } else { ?> <form action="<?php echo get_option('siteurl'); ?> /wp-comments-post.php" method="post" id="commentform"> <?php if ($user_ID) { ?> <?php $fbuid = fbc_get_fbconnect_user(); ?> <p>Logged in as <a href="<?php echo get_option('siteurl'); ?> /wp-admin/profile.php"><?php echo $user_identity; ?> </a>. <?php if ($fbuid) { ?> <a onclick="FBConnect.logout(); return false" href="#" title="Log out of this Account">Logout »</a></p> <?php } else { ?>