评论区硬切换实现
This commit is contained in:
1 parent
ed914d2eec
commit
b8ef4d81a4
32 files changed
+946
-1008
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<?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 '<svg class="' . esc_attr($class) . '" aria-hidden="true"><use xlink:href="#icon-' . esc_attr($name) . '"></use></svg>';
|
||||
}
|
||||
endif;
|
||||
Reference in new issue
Block a user