2013-02-20 12:04:15 +00:00
|
|
|
<?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");
|
|
|
|
}
|
|
|
|
|
2017-04-26 17:57:36 +00:00
|
|
|
/**
|
|
|
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
|
|
|
*/
|
2013-02-20 12:04:15 +00:00
|
|
|
function hook_article_button($line) {
|
2013-04-17 14:34:18 +00:00
|
|
|
if (!get_pref("COMBINED_DISPLAY_MODE")) {
|
2013-03-20 21:59:08 +00:00
|
|
|
$rv = "<img src=\"plugins/close_button/button.png\"
|
2013-02-20 12:04:15 +00:00
|
|
|
class='tagsPic' style=\"cursor : pointer\"
|
2018-12-01 14:05:28 +00:00
|
|
|
onclick=\"Article.closeArticlePanel()\"
|
2013-02-20 12:04:15 +00:00
|
|
|
title='".__('Close article')."'>";
|
|
|
|
}
|
|
|
|
|
|
|
|
return $rv;
|
|
|
|
}
|
2013-04-19 13:31:56 +00:00
|
|
|
|
|
|
|
function api_version() {
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
2017-04-26 17:57:36 +00:00
|
|
|
}
|