37 lines
727 B
PHP
37 lines
727 B
PHP
|
<?php
|
||
|
class Toggle_Sort_Titles extends Plugin {
|
||
|
private $host;
|
||
|
|
||
|
function about() {
|
||
|
return array(1.0,
|
||
|
"Add a 't' hotkey to toggle headlines sorting by title and by default",
|
||
|
"ggrandou" );
|
||
|
}
|
||
|
|
||
|
function init($host) {
|
||
|
$this->host = $host;
|
||
|
$host->add_hook($host::HOOK_HOTKEY_INFO, $this);
|
||
|
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
|
||
|
}
|
||
|
|
||
|
function hook_hotkey_info($hotkeys) {
|
||
|
$hotkeys[__("Feed")]["feed_toggle_title"] = __("Toggle Headlines grouping by Titles");
|
||
|
return $hotkeys;
|
||
|
}
|
||
|
|
||
|
function hook_hotkey_map($hotkeys) {
|
||
|
$hotkeys["t"] = "feed_toggle_title";
|
||
|
return $hotkeys;
|
||
|
}
|
||
|
|
||
|
function get_js() {
|
||
|
return file_get_contents(__DIR__ . "/init.js");
|
||
|
}
|
||
|
|
||
|
function api_version() {
|
||
|
return 2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|