Quantcast
Channel: Shannon Whitley
Viewing all articles
Browse latest Browse all 12

Customize the AddToAny Plugin for App.net

$
0
0

I use Share Buttons by Lockerz/AddToAny to generate the share buttons at the bottom of each post on this blog. The plugin doesn’t yet offer an option for App.net, but it was easy to extend the plugin to add the service. I’m taking advantage of App.net’s intents to enable the feature.

The following code can be placed in your theme’s function.php file.

Now you can easily share this post on App.net

//AddToAny Update for App.net
function addtoany_add_services( $services ) {
  $services['adn_share'] = array(
    'name' => 'App.net',
    'icon_url' => 'https://d2c01jv13s9if1.cloudfront.net/i/V/_/K/V_KkNIUhgyiwXSIeh1j0kP9LXWA.ico',
    'icon_width' => 16,
    'icon_height' => '16" style="width:16px;height:16px;',
    'href' => 'https://alpha.app.net/intent/post?text=A2A_LINKNAME%20A2A_LINKURL'
  );
  return $services;
}
add_filter('A2A_SHARE_SAVE_services', 'addtoany_add_services', 10, 1);

Update: The AddToAny CSS file was allowing the App.net icon to display at its full size (32×32). I implemented a hack in the icon_height property to include a style override. Alternatively, you could override the CSS file where height:auto and width:auto are specified for images.

data-url=”http://www.voiceoftech.com/swhitley/index.php/2012/11/customize-the-addtoany-plugin-for-app-net/”
data-text=”Customize the AddToAny Plugin for App.net (Shannon Whitley)”
data-count=”vertical”
>Tweet

App.netShare


Viewing all articles
Browse latest Browse all 12

Latest Images

Trending Articles





Latest Images