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).
26 lines
783 B
PHP
26 lines
783 B
PHP
<?php
|
|
/**
|
|
* Comment sprite icons — <use> references into the runtime svg-icon sprite.
|
|
*
|
|
* Mirrors zib_get_svg() from the reference comments module. Symbol
|
|
* definitions are injected by assets/js/runtime/svg-icon.js, which the
|
|
* vendor runtime lazy-loads on every page (main.js: tbquire(['svg-icon'])).
|
|
*
|
|
* @package AKSRT
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
if (!function_exists('aksrt_get_comment_icon')) :
|
|
/**
|
|
* Sprite-referenced SVG icon (legacy: zib_get_svg).
|
|
*
|
|
* @param string $name Sprite key (like / topping / approve / menu_2 / signup).
|
|
* @param string $class Classes for the svg element.
|
|
* @return string
|
|
*/
|
|
function aksrt_get_comment_icon(string $name, string $class = 'icon'): string {
|
|
return aksrt_icon_markup('zibsvg-' . $name, $class);
|
|
}
|
|
endif;
|