]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
move tweet button to a plugin, implement basic support for article action button...
[tt-rss.git] / include / functions.php
index 41b31553af5b5f434e2d1c6fa7125fd015c99a32..c633c03b53d115e448cec66dc71a9fb35b6eb15a 100644 (file)
                                        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')."\"