refactor(icons): converge every icon render on aksrt_icon_markup

aksrt_get_comment_icon(), aksrt_renderer_svg_icon() and the widget
renderer's private icon_markup() all delegate to the unified helper,
and the duplicated 24px empty-state SVGs in user-center/user-home now
come from one aksrt_empty_state_svgs(). Contract tests follow the
delegation (sprite <use> markup asserted in the helper).
This commit is contained in:
kate522 committed 2026-09-06 12:59:44 +08:00
1 parent d599bbccd9
commit e4745d501e
8 files changed
+228 -23

No files matched your search

@@ -85,7 +85,9 @@ test('vertical notice supports only custom and article sources with Zibll swiper
assert.doesNotMatch(renderer, /aksrt-widget-notice/);
assert.match(schema, /'id' => 'title'[^\n]+allow_html/);
assert.match(renderer, /wp_html_excerpt\([^\n]+160, '\.\.\.'/);
assert.match(renderer, /str_starts_with\(\$icon, 'customsvg-'\)/);
// Icon value rendering lives in the unified helper the renderer delegates to.
assert.match(renderer, /aksrt_icon_markup\(\$icon\)/);
assert.match(read('inc/helpers/aksrt-icons.php'), /str_starts_with\(\$value, 'customsvg-'\)/);
assert.match(css, /\.swiper-bulletin \.new-swiper\s*\{[^}]*height:\s*2\.4em/s);
assert.match(css, /\.swiper-bulletin \.new-swiper\s*\{[^}]*line-height:\s*2\.4em/s);
assert.match(css, /\.bulletin-icon\s*\{[^}]*width:\s*26px[^}]*height:\s*26px[^}]*font-size:\s*18px/s);