feat(submit): make video cover row icon-only with hover titles

Replace the video-pic/video/clear button labels with icon-only buttons
carrying title + aria-label (设置视频封面/视频/清除), center the glyphs
via flex to fix the upward icon shift, rename the media picker title to
为视频设置封面, and drop the unused setVideoCover i18n key. Contract
test updated to pin the new markup and string set.
This commit is contained in:
kate522 committed 2026-09-06 10:10:12 +08:00
1 parent 51a591e2b9
commit daee4cd67f
4 files changed
+29 -14

No files matched your search

+12 -6
View File
@@ -47,8 +47,10 @@ $can_video = !empty($ctx['can_cover_video']);
</button>
<?php endif; ?>
<?php if ($can_video) : ?>
<button type="button" class="but btn-video-pic" data-featured-action="video_pic">
<i class="fa fas fa-image"></i> <?php esc_html_e('设置视频首图封面', 'aksrt'); ?>
<button type="button" class="but btn-video-pic" data-featured-action="video_pic"
title="<?php esc_attr_e('设置视频封面', 'aksrt'); ?>"
aria-label="<?php esc_attr_e('设置视频封面', 'aksrt'); ?>">
<i class="fa fas fa-image"></i>
</button>
<?php endif; ?>
<?php if ($can_slide) : ?>
@@ -57,12 +59,16 @@ $can_video = !empty($ctx['can_cover_video']);
</button>
<?php endif; ?>
<?php if ($can_video) : ?>
<button type="button" class="but btn-video" data-featured-action="video">
<i class="fa fas fa-video"></i> <?php esc_html_e('视频', 'aksrt'); ?>
<button type="button" class="but btn-video" data-featured-action="video"
title="<?php esc_attr_e('视频', 'aksrt'); ?>"
aria-label="<?php esc_attr_e('视频', 'aksrt'); ?>">
<i class="fa fas fa-video"></i>
</button>
<?php endif; ?>
<button type="button" class="but c-red btn-delete" data-featured-action="close" <?php echo $type === '' ? 'hidden' : ''; ?>>
<i class="fa fas fa-trash-alt"></i> <?php esc_html_e('清除', 'aksrt'); ?>
<button type="button" class="but c-red btn-delete" data-featured-action="close" <?php echo $type === '' ? 'hidden' : ''; ?>
title="<?php esc_attr_e('清除', 'aksrt'); ?>"
aria-label="<?php esc_attr_e('清除', 'aksrt'); ?>">
<i class="fa fas fa-trash-alt"></i>
</button>
</div>
<input type="hidden" name="featured_data" value="<?php echo esc_attr(wp_json_encode(['type' => $type, 'data' => $data])); ?>" data-featured-json>