feat(submit): add user media library

This commit is contained in:
2026-09-04 22:53:33 +08:00
parent 44e165d34e
commit f3fcfe45da
23 changed files with 1321 additions and 945 deletions
+6 -4
View File
@@ -60,10 +60,12 @@ $featured_args = ['type' => '', 'data' => new stdClass(), 'options' => [
if ($edit_post) {
if (!empty($post_meta['featured_video'])) {
$featured_args['type'] = 'video';
$featured_args['data'] = [
'url' => (string) $post_meta['featured_video'],
'pic' => (string) ($post_meta['thumbnail_url'] ?? ''),
];
$featured_args['data'] = [
'url' => (string) $post_meta['featured_video'],
'pic' => (string) ($post_meta['thumbnail_url'] ?? ''),
'id' => absint($post_meta['featured_video_attachment_id'] ?? 0),
];
} elseif (!empty($post_meta['featured_slide'])) {
$slides = array_filter(array_map('trim', explode(',', (string) $post_meta['featured_slide'])));
$slide_data = [];