This plugin adds support for users to login with their Glitch.com account.
Glitch Authenticator is not endorsed by or affiliated with Tiny Speck, Inc., the makers of Glitch, in any way.
You will need to generate an API key for your site.
apply_filters('glitchauth_display_login', $glitchLoginButton) - customise the Login with Glitch buttonapply_filters('glitchauth_loginmessage', $message, $error, $error_description) - customise the login error messagedo_action('glitchauth_new_user', $obj) - new userdo_action('glitchauth_returning_user', $obj) - returning userapply_filters('glitchauth_comment_avatar_size', $avatarSize) - Change avatar size displayed in comments. Options are: '50' (default), '100', '172'To generate a Glitch login button for your theme, use the glitchauth_login_url function in place of wp_login_url.
Example:
<?php
echo '<a class="button" href="' . glitchauth_login_url() . '">Login with Glitch</a>';
// Alternatively, bring the user back to current page after login by using the redirect_to param
// echo '<a class="button" href="' . glitchauth_login_url() . '&' . http_build_query(array('redirect_to'=>get_permalink())) . '">Login with Glitch</a>';
?>
If in The Loop, you can use the_glitch_avatar function.
Example:
<?php
if ( have_posts() ) while ( have_posts() ) : the_post();
the_glitch_avatar('100'); // sizes: '50','100','172'
endwhile;
?>
To get a specific user's Glitch Avatar, use the glitchauth_get_glitch_avatar() function.
Example:
<?php
$current_user = wp_get_current_user();
echo '<img class="glitch-avatar" src="' . glitchauth_get_glitch_avatar($current_user) . '">';
?>
Requires: 2.8 or higher
Compatible up to: 3.3.2
Last Updated: 2012-4-29
Downloads: 105
Got something to say? Need help?