1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-29 12:20:51 +02:00
ttrss/plugins/close_button/init.php

34 lines
676 B
PHP
Raw Normal View History

<?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");
}
2018-12-09 14:35:00 +01:00
function get_css() {
2021-02-17 11:45:38 +01:00
return ".post .header .buttons i.material-icons.icon-close-article { color : red; }";
2018-12-09 14:35:00 +01:00
}
function hook_article_button($line) {
2021-02-25 12:49:58 +01:00
if (!get_pref(Prefs::COMBINED_DISPLAY_MODE)) {
2021-02-10 19:40:31 +01:00
return "<i class='material-icons icon-close-article'
2018-12-09 14:35:00 +01:00
style='cursor : pointer' onclick='Article.close()'
title='".__('Close article')."'>close</i>";
}
}
2013-04-19 15:31:56 +02:00
function api_version() {
return 2;
}
2021-02-08 17:42:10 +01:00
}