]>
Commit | Line | Data |
---|---|---|
989b399e AD |
1 | <?php |
2 | class Close_Button extends Plugin { | |
989b399e AD |
3 | private $host; |
4 | ||
5 | function init($host) { | |
989b399e AD |
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 | ||
21ce7d9e AD |
17 | /** |
18 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) | |
19 | */ | |
989b399e | 20 | function hook_article_button($line) { |
a42c55f0 | 21 | if (!get_pref("COMBINED_DISPLAY_MODE")) { |
2a3b6de0 | 22 | $rv = "<img src=\"plugins/close_button/button.png\" |
989b399e AD |
23 | class='tagsPic' style=\"cursor : pointer\" |
24 | onclick=\"closeArticlePanel()\" | |
25 | title='".__('Close article')."'>"; | |
26 | } | |
27 | ||
28 | return $rv; | |
29 | } | |
106a3de9 AD |
30 | |
31 | function api_version() { | |
32 | return 2; | |
33 | } | |
34 | ||
21ce7d9e | 35 | } |