]> git.wh0rd.org - tt-rss.git/blob - plugins/close_button/init.php
update phpmd ruleset to use (subset) of cleancode
[tt-rss.git] / plugins / close_button / init.php
1 <?php
2 class Close_Button extends Plugin {
3 private $host;
4
5 function init($host) {
6 $this->host = $host;
7
8 $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
9 }
10
11 function about() {
12 return array(1.0,
13 "Adds a button to close article panel",
14 "fox");
15 }
16
17 /**
18 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
19 */
20 function hook_article_button($line) {
21 if (!get_pref("COMBINED_DISPLAY_MODE")) {
22 $rv = "<img src=\"plugins/close_button/button.png\"
23 class='tagsPic' style=\"cursor : pointer\"
24 onclick=\"closeArticlePanel()\"
25 title='".__('Close article')."'>";
26 }
27
28 return $rv;
29 }
30
31 function api_version() {
32 return 2;
33 }
34
35 }