1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 06:55:56 +00:00

pluginhost: allow overriding default sort modes via HOOK_HEADLINES_CUSTOM_SORT_MAP etc

This commit is contained in:
Andrew Dolgov
2020-08-13 12:23:27 +03:00
parent dfa65e9374
commit ddf9227dc4
3 changed files with 17 additions and 0 deletions

View File

@@ -2352,6 +2352,13 @@ class Feeds extends Handler_Protected {
break;
}
if (!$query) {
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINES_CUSTOM_SORT_OVERRIDE) as $p) {
list ($query, $skip_first_id) = $p->hook_headlines_custom_sort_override($order);
if ($query) break;
}
}
return [$query, $skip_first_id];
}
}