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:
@@ -381,6 +381,9 @@ class TabPostsWidget extends \WP_Widget {
|
|||||||
'category_id' => absint($tab['category_id'] ?? 0),
|
'category_id' => absint($tab['category_id'] ?? 0),
|
||||||
'orderby' => $orderby,
|
'orderby' => $orderby,
|
||||||
'count' => max(0, min(20, (int) ($tab['count'] ?? 0))),
|
'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']),
|
'enabled' => !empty($tab['enabled']),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user