Issue #1313732 by matglas86: Added Twitter via support for twitter button.
authorMatthias Glastra
Mon, 26 Dec 2011 21:03:25 +0000 (22:03 +0100)
committerMatthias Glastra
Mon, 26 Dec 2011 21:03:25 +0000 (22:03 +0100)
classes/AddThis.php

index bf17a5e..4a84ca2 100644 (file)
@@ -129,8 +129,12 @@ class AddThis {
 
     // Theme function might only give a display name and
     // render on default implementation.
-    if (!isset($options['#display']) || $options['#display']['type'] != $display) {
-      $options['#display'] = $display_information;
+    if (!isset($options['#display']) ||
+        (isset($options['#display']['type']) && $options['#display']['type'] != $display))
+    {
+      $options['#display'] = isset($options['#display']) ? $options['#display'] : array();
+      $options['#display'] = array_merge($options['#display'], $display_information);
+      $options['#display']['type'] = $display;
     }
 
     // When #entity and #entity_type exist, use the entity's URL.