fix(widgets): persist tab topics/limit_day/pay_type on save

update() now stores per-tab filter fields added to the form/normalize path.
This commit is contained in:
2026-07-21 14:49:37 +08:00
parent 8ad0558a36
commit 6a7ace0f89
+3
View File
@@ -381,6 +381,9 @@ class TabPostsWidget extends \WP_Widget {
'category_id' => absint($tab['category_id'] ?? 0),
'orderby' => $orderby,
'count' => max(0, min(20, (int) ($tab['count'] ?? 0))),
'topics' => sanitize_text_field((string) ($tab['topics'] ?? '')),
'limit_day' => max(0, (int) ($tab['limit_day'] ?? 0)),
'pay_type' => sanitize_key((string) ($tab['pay_type'] ?? '')),
'enabled' => !empty($tab['enabled']),
];
}