feat(widgets): per-tab topics/limit_day/pay_type filters

TabPosts each tab can filter topics taxonomy, date window and pay type;
REST and widget-set.js pass the extra query args.
This commit is contained in:
kate522 committed 2026-07-21 14:36:01 +08:00
1 parent 0e8c9d12c7
commit 9f485cbe45
2 files changed
+28 -2

No files matched your search

+4 -1
View File
@@ -93,7 +93,10 @@ class WidgetAjax {
'orderby' => sanitize_key((string) ($request->get_param('orderby') ?? 'date')),
'count' => max(0, min(20, (int) ($request->get_param('tab_count') ?? 0))),
'enabled' => true,
];
'topics' => sanitize_text_field((string) ($request->get_param('topics') ?? '')),
'limit_day' => max(0, (int) ($request->get_param('limit_day') ?? 0)),
'pay_type' => sanitize_key((string) ($request->get_param('pay_type') ?? '')),];
$opts = [
'style' => $style,
'paginate' => $paginate,