+ +
+
-
+
diff --git a/templates/parts/submit/context.php b/templates/parts/submit/context.php index 373e797c..09bcda36 100644 --- a/templates/parts/submit/context.php +++ b/templates/parts/submit/context.php @@ -66,13 +66,21 @@ if ($edit_post) { ]; } elseif (!empty($post_meta['featured_slide'])) { $slides = array_filter(array_map('trim', explode(',', (string) $post_meta['featured_slide']))); - $featured_args['type'] = 'slide'; - $featured_args['data'] = array_map(static function ($u) { - return ['url' => $u]; - }, $slides); + $slide_data = []; + foreach ($slides as $attachment_id) { + $id = absint($attachment_id); + $url = $id > 0 ? wp_get_attachment_image_url($id, 'full') : false; + if ($url) { + $slide_data[] = ['id' => $id, 'url' => $url]; + } + } + if ($slide_data) { + $featured_args['type'] = 'slide'; + $featured_args['data'] = $slide_data; + } } else { $thumb = get_the_post_thumbnail_url($edit_post, 'full') - ?: (string) ($post_meta['thumbnail_url'] ?? $post_meta['cover_images'] ?? ''); + ?: (string) ($post_meta['thumbnail_url'] ?? $post_meta['cover_image'] ?? ''); if ($thumb !== '') { $featured_args['type'] = 'image'; $featured_args['data'] = ['url' => $thumb]; diff --git a/templates/parts/submit/editor-main.php b/templates/parts/submit/editor-main.php index 4fcd347d..ca35c148 100644 --- a/templates/parts/submit/editor-main.php +++ b/templates/parts/submit/editor-main.php @@ -11,8 +11,7 @@ $settings = $ctx['settings']; $edit_post = $ctx['edit_post']; $is_can_new = !empty($ctx['is_can_new']); ?> -
-
+
-
+
+
-
-
+
+

-

+

-
+
-
+
diff --git a/templates/parts/submit/featured.php b/templates/parts/submit/featured.php index 6b9ad9a5..331308e9 100644 --- a/templates/parts/submit/featured.php +++ b/templates/parts/submit/featured.php @@ -21,51 +21,50 @@ $can_image = !empty($ctx['can_cover_image']); $can_slide = !empty($ctx['can_cover_slide']); $can_video = !empty($ctx['can_cover_video']); ?> -