This plugin adds support for users to login with their Glitch.com account.
| Author: | ping (profile at wordpress.org) |
| WordPress version required: | 2.8 |
| WordPress version tested: | 3.3.2 |
| Plugin version: | 0.7 |
| Added to WordPress repository: | 27-11-2011 |
| Last updated: | 29-04-2012
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
| Rating, %: | 0 |
| Rated by: | 0 |
| Plugin URI: | http://wordpress.org/extend/plugins/glitch-au... |
| Total downloads: | 976 |
![]() Click to start download |
|
Glitch Authenticator is not endorsed by or affiliated with Tiny Speck, Inc., the makers of Glitch, in any way.
Features
- allows users to login with their Glitch.com account
- displays Glitch avatars in comments
You will need to generate an API key for your site.
Hooks for Customisation
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'
Theme Integration
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) . '">';
?>
