summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-08-13 12:23:27 +0300
committerAndrew Dolgov <[email protected]>2020-08-13 12:23:27 +0300
commitddf9227dc48faf7effbf3bf263aa271f35d74c43 (patch)
treeaf7ddd4acd9ec9d44924e9bb0d970a99585280b6 /index.php
parentdfa65e9374a52441d9c7f2d9187dc831b705858e (diff)
pluginhost: allow overriding default sort modes via HOOK_HEADLINES_CUSTOM_SORT_MAP etc
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/index.php b/index.php
index f1a8d0f0c..543d2b008 100644
--- a/index.php
+++ b/index.php
@@ -198,6 +198,14 @@
<option value="feed_dates"><?php echo __('Newest first') ?></option>
<option value="date_reverse"><?php echo __('Oldest first') ?></option>
<option value="title"><?php echo __('Title') ?></option>
+
+ <?php foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINES_CUSTOM_SORT_MAP) as $p) {
+ $sort_map = $p->hook_headlines_custom_sort_map();
+
+ foreach ($sort_map as $sort_value => $sort_title) {
+ print "<option value=\"" . htmlspecialchars($sort_value) . "\">$sort_title</option>";
+ }
+ } ?>
</select>
<div dojoType="fox.form.ComboButton" onclick="Feeds.catchupCurrent()">