feat(topics): restore topic taxonomy workflow

This commit is contained in:
kate522 committed 2026-11-10 22:31:11 +08:00
1 parent f3dd1ec3b1
commit a254cbd3e9
59 files changed
+771 -192

No files matched your search

+8
View File
@@ -96,6 +96,12 @@ $categories = array_map(
\Jio\Core\SubmitCategories::tree($settings)
);
$current_cats = $edit_post ? wp_get_post_categories($edit_post->ID) : [];
$topics = array_map(
static fn(array $node): \WP_Term => $node['term'],
\Jio\Core\SubmitTopics::tree($settings)
);
$current_topics = $edit_post ? wp_get_post_terms($edit_post->ID, 'topics', ['fields' => 'ids']) : [];
$current_topics = is_array($current_topics) ? array_map('intval', $current_topics) : [];
$custom_dimensions = [];
$current_cf = [];
@@ -181,6 +187,8 @@ return [
'featured_args' => $featured_args,
'categories' => $categories,
'current_cats' => $current_cats,
'topics' => $topics,
'current_topics' => $current_topics,
'custom_dimensions' => $custom_dimensions,
'current_cf' => $current_cf,
'current_title' => $current_title,