summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-12-20 23:57:27 +0400
committerAndrew Dolgov <[email protected]>2011-12-20 23:59:37 +0400
commitf9ac31d6712b4400a616e49d6217d55edb0daf9c (patch)
tree453002094fe5070074581529a72fe1e083631b8f /include
parent73621c56055eaff7d222183bfdb5d4fabeb4e209 (diff)
move tweet button to a plugin, implement basic support for article action button plugins
Diffstat (limited to 'include')
-rw-r--r--include/functions.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/functions.php b/include/functions.php
index 41b31553a..c633c03b5 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -3289,11 +3289,15 @@
onclick=\"emailArticle($id)\"
alt='Zoom' title='".__('Forward by email')."'>";
- if (ENABLE_TWEET_BUTTON) {
- $rv['content'] .= "<img src=\"".theme_image($link, 'images/art-tweet.png')."\"
- class='tagsPic' style=\"cursor : pointer\"
- onclick=\"tweetArticle($id)\"
- alt='Zoom' title='".__('Share on Twitter')."'>";
+ $button_plugins = explode(",", ARTICLE_BUTTON_PLUGINS);
+
+ foreach ($button_plugins as $p) {
+ $pclass = "${p}_button";
+
+ if (class_exists($pclass)) {
+ $plugin = new $pclass($link);
+ $rv['content'] .= $plugin->render($id);
+ }
}
$rv['content'] .= "<img src=\"".theme_image($link, 'images/art-share.png')."\"