fix(frontend): remove duplicate select arrow and show the WordPress brand icon

This commit is contained in:
kate522 committed 2026-10-06 13:23:05 +08:00
1 parent 962ab5c290
commit fe57022550
5 files changed
+38 -4

No files matched your search

@@ -286,10 +286,13 @@ namespace {
ob_start();
(new PageAdminSet())->render_modal();
$modal_icons = (string) ob_get_clean();
foreach (['fa fas fa-sliders-h', 'fa fas fa-times', 'fa fas fa-chart-pie', 'fa fas fa-wordpress', 'fa fas fa-check'] as $icon) {
// fa-wordpress 属于 FA5 的 Brands 字体族,需要 `fa fab` 前缀;
// 误用 `fa fas` 会让它解析到 Solid 族,字符盒为空、图标不显示。
foreach (['fa fas fa-sliders-h', 'fa fas fa-times', 'fa fas fa-chart-pie', 'fa fab fa-wordpress', 'fa fas fa-check'] as $icon) {
set_check(strpos($modal_icons, $icon) !== false, "modal must use the FA5 icon {$icon}");
}
set_check(strpos($modal_icons, 'class="fa fa-') === false, 'modal must not use bare FA4 icon classes');
set_check(strpos($modal_icons, 'fa fas fa-wordpress') === false, 'fa-wordpress must not use the Solid family');
// 文章格式:参考主题固定 standard/图像/画廊/视频 四项,不读主题注册集。
// 无格式时 WP 的 selected() 不选中任何项,浏览器默认落到第一项 standard。