codysnider /
tt-rss
| 1 | <?php |
||
| 2 | class Close_Button extends Plugin { |
||
| 3 | private $host; |
||
| 4 | |||
| 5 | public function init($host) { |
||
| 6 | $this->host = $host; |
||
| 7 | |||
| 8 | $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); |
||
| 9 | } |
||
| 10 | |||
| 11 | public function about() { |
||
| 12 | return array(1.0, |
||
| 13 | "Adds a button to close article panel", |
||
| 14 | "fox"); |
||
| 15 | } |
||
| 16 | |||
| 17 | public function get_css() { |
||
| 18 | return "i.icon-close-article { color : red; }"; |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
| 23 | */ |
||
| 24 | public function hook_article_button($line) { |
||
|
0 ignored issues
–
show
|
|||
| 25 | if (!get_pref("COMBINED_DISPLAY_MODE")) { |
||
| 26 | $rv = "<i class='material-icons icon-close-article' |
||
| 27 | style='cursor : pointer' onclick='Article.close()' |
||
| 28 | title='".__('Close article')."'>close</i>"; |
||
| 29 | } |
||
| 30 | |||
| 31 | return $rv; |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
| 32 | } |
||
| 33 | |||
| 34 | public function api_version() { |
||
| 35 | return 2; |
||
| 36 | } |
||
| 37 | |||
| 38 | } |
||
| 39 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.