diff options
author | Andrew Dolgov <[email protected]> | 2021-03-05 09:52:45 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-05 09:52:45 +0300 |
commit | 198c9b40695774104d4c4737096f5d18dcd5da41 (patch) | |
tree | ba3f1d8f8a86462d2e23eb17b4b4a3f8b1b430fb /plugins/scored_oldest_first | |
parent | e8e63290407b2d9eb05e78327b78992315f894c3 (diff) |
split scored_oldest_first into a separate repo
Diffstat (limited to 'plugins/scored_oldest_first')
-rw-r--r-- | plugins/scored_oldest_first/init.php | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/plugins/scored_oldest_first/init.php b/plugins/scored_oldest_first/init.php deleted file mode 100644 index bb9e840dc..000000000 --- a/plugins/scored_oldest_first/init.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -class Scored_Oldest_First extends Plugin { - - function init($host) { - $host->add_hook($host::HOOK_HEADLINES_CUSTOM_SORT_MAP, $this); - $host->add_hook($host::HOOK_HEADLINES_CUSTOM_SORT_OVERRIDE, $this); - } - - function hook_headlines_custom_sort_map() { - return [ - "dates_reverse_scored" => "Oldest first (with score)" - ]; - } - - function hook_headlines_custom_sort_override($order) { - if ($order == "dates_reverse_scored") { - return [ "score DESC, updated", true ]; - } else { - return [ "", false ]; - } - } - - function about() { - return array(null, - "Consider article score while sorting by oldest first", - "fox", - false, - ""); - } - - function api_version() { - return 2; - } - -} |