1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-07-01 12:40:50 +02:00
ttrss/plugins/close_button/init.php
Andrew Dolgov 21ce7d9ec0 update phpmd ruleset to use (subset) of cleancode
fix various minor issues reported by static analysis
remove redundant php closing tag from several more files
2017-04-26 20:57:36 +03:00

35 lines
650 B
PHP

<?php
class Close_Button extends Plugin {
private $host;
function init($host) {
$this->host = $host;
$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
}
function about() {
return array(1.0,
"Adds a button to close article panel",
"fox");
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function hook_article_button($line) {
if (!get_pref("COMBINED_DISPLAY_MODE")) {
$rv = "<img src=\"plugins/close_button/button.png\"
class='tagsPic' style=\"cursor : pointer\"
onclick=\"closeArticlePanel()\"
title='".__('Close article')."'>";
}
return $rv;
}
function api_version() {
return 2;
}
}