diff --git a/addthis.admin.inc b/addthis.admin.inc index b4006996cdcd47c0c88b09a1d145ca913c666029..0c4437a19027040ebd598ec9a2ec399ef34947d6 100644 --- a/addthis.admin.inc +++ b/addthis.admin.inc @@ -1,4 +1,10 @@ _addthis_create_button($node, $teaser), - 'html' => TRUE, - ); - } + if (! $teaser || variable_get('addthis_display_in_teasers', '0')) { + $links['addthis'] = array( + 'title' => _addthis_create_button($node, $teaser), + 'html' => TRUE, + ); + } } return $links; @@ -108,7 +108,8 @@ function _addthis_create_button($node=NULL, $teaser = FALSE) { variable_get('addthis_image_height', '16'), variable_get('addthis_image_attributes', 'alt=""') )); - } else { + } + else { return ( sprintf('
', - $teaser ? url('node/'.$node->nid, array('absolute' => 1) ) : '[URL]', + $teaser ? url('node/'. $node->nid, array('absolute' => 1) ) : '[URL]', $teaser ? addslashes($node->title) : '[TITLE]', variable_get('addthis_image', 'http://s9.addthis.com/button1-share.gif'), variable_get('addthis_image_width', '125'),