refactor: rename the theme brand and every identifier from AKSRT to Jio
Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.
Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)
Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
(dropped 3 stale entries, added the 17 missing ones)
Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
when it is empty
Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.
Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
@@ -5,12 +5,12 @@
|
||||
* Mirrors legacy / legacy / legacy
|
||||
* from the legacy comments-list module.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('aksrt_get_comment_like_html')) :
|
||||
if (!function_exists('jio_get_comment_like_html')) :
|
||||
/**
|
||||
* Header like control (legacy: legacy).
|
||||
*
|
||||
@@ -18,7 +18,7 @@ if (!function_exists('aksrt_get_comment_like_html')) :
|
||||
* @param bool $enabled Like enabled.
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_comment_like_html($comment, bool $enabled = true): string {
|
||||
function jio_get_comment_like_html($comment, bool $enabled = true): string {
|
||||
if (!$enabled) {
|
||||
return '';
|
||||
}
|
||||
@@ -26,11 +26,11 @@ if (!function_exists('aksrt_get_comment_like_html')) :
|
||||
if ($comment_id <= 0) {
|
||||
return '';
|
||||
}
|
||||
$like_count = function_exists('aksrt_get_comment_likes') ? (int) aksrt_get_comment_likes($comment_id) : 0;
|
||||
$like_label = function_exists('aksrt_format_number') ? aksrt_format_number($like_count) : number_format_i18n($like_count);
|
||||
$is_liked = function_exists('aksrt_is_comment_liked') && aksrt_is_comment_liked($comment_id);
|
||||
$like_count = function_exists('jio_get_comment_likes') ? (int) jio_get_comment_likes($comment_id) : 0;
|
||||
$like_label = function_exists('jio_format_number') ? jio_format_number($like_count) : number_format_i18n($like_count);
|
||||
$is_liked = function_exists('jio_is_comment_liked') && jio_is_comment_liked($comment_id);
|
||||
$classes = 'action action-comment-like muted-2-color flex0 ml10' . ($is_liked ? ' actived' : '');
|
||||
$icon = function_exists('aksrt_get_comment_icon') ? aksrt_get_comment_icon('like', 'icon mr3') : '';
|
||||
$icon = function_exists('jio_get_comment_icon') ? jio_get_comment_icon('like', 'icon mr3') : '';
|
||||
|
||||
return sprintf(
|
||||
'<a href="javascript:;" data-comment-action="like" data-action="comment_like" class="%1$s" data-pid="%2$d" data-active="%3$s" aria-pressed="%4$s">%5$s<text></text><count>%6$s</count></a>',
|
||||
@@ -44,7 +44,7 @@ if (!function_exists('aksrt_get_comment_like_html')) :
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_comment_avatar_box')) :
|
||||
if (!function_exists('jio_get_comment_avatar_box')) :
|
||||
/**
|
||||
* Comment avatar box (legacy: legacy).
|
||||
*
|
||||
@@ -53,7 +53,7 @@ if (!function_exists('aksrt_get_comment_avatar_box')) :
|
||||
* @param bool $link Wrap in a link when a target URL exists.
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_comment_avatar_box(WP_Comment $comment, string $class = 'avatar-img comt-avatar', bool $link = true): string {
|
||||
function jio_get_comment_avatar_box(WP_Comment $comment, string $class = 'avatar-img comt-avatar', bool $link = true): string {
|
||||
$user_id = (int) $comment->user_id;
|
||||
$size = 45;
|
||||
$avatar = $user_id > 0
|
||||
@@ -65,7 +65,7 @@ if (!function_exists('aksrt_get_comment_avatar_box')) :
|
||||
return $html;
|
||||
}
|
||||
if ($user_id > 0) {
|
||||
$url = function_exists('aksrt_get_user_home_url') ? aksrt_get_user_home_url($user_id) : get_author_posts_url($user_id);
|
||||
$url = function_exists('jio_get_user_home_url') ? jio_get_user_home_url($user_id) : get_author_posts_url($user_id);
|
||||
return '<a href="' . esc_url($url) . '">' . $html . '</a>';
|
||||
}
|
||||
if (!empty($comment->comment_author_url)) {
|
||||
@@ -75,7 +75,7 @@ if (!function_exists('aksrt_get_comment_avatar_box')) :
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_comments_user_name_html')) :
|
||||
if (!function_exists('jio_get_comments_user_name_html')) :
|
||||
/**
|
||||
* Name row (legacy: legacy) — topping + author + badges.
|
||||
*
|
||||
@@ -83,26 +83,26 @@ if (!function_exists('aksrt_get_comments_user_name_html')) :
|
||||
* @param array<string,mixed> $settings Display settings.
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_comments_user_name_html(WP_Comment $comment, array $settings = []): string {
|
||||
function jio_get_comments_user_name_html(WP_Comment $comment, array $settings = []): string {
|
||||
$user_id = (int) $comment->user_id;
|
||||
$show_author_tag = !isset($settings['author_tag']) || !empty($settings['author_tag']);
|
||||
$is_pinned = function_exists('aksrt_is_comment_pinned') && aksrt_is_comment_pinned($comment);
|
||||
$is_pinned = function_exists('jio_is_comment_pinned') && jio_is_comment_pinned($comment);
|
||||
$is_post_author = $user_id > 0 && $user_id === (int) get_post_field('post_author', $comment->comment_post_ID);
|
||||
|
||||
$topping = '';
|
||||
if ($is_pinned) {
|
||||
$topping_icon = function_exists('aksrt_get_comment_icon') ? aksrt_get_comment_icon('topping') : '';
|
||||
$topping = '<badge class="badge-topping jb-blue mr6 flex0" title="' . esc_attr__('置顶评论', 'aksrt') . '" data-toggle="tooltip">' . $topping_icon . '</badge>';
|
||||
$topping_icon = function_exists('jio_get_comment_icon') ? jio_get_comment_icon('topping') : '';
|
||||
$topping = '<badge class="badge-topping jb-blue mr6 flex0" title="' . esc_attr__('置顶评论', 'jio') . '" data-toggle="tooltip">' . $topping_icon . '</badge>';
|
||||
}
|
||||
|
||||
$user_name = '';
|
||||
if ($user_id > 0) {
|
||||
$user = get_userdata($user_id);
|
||||
if ($user instanceof WP_User) {
|
||||
$url = function_exists('aksrt_get_user_home_url') ? aksrt_get_user_home_url($user_id) : get_author_posts_url($user_id);
|
||||
$url = function_exists('jio_get_user_home_url') ? jio_get_user_home_url($user_id) : get_author_posts_url($user_id);
|
||||
$user_name = '<a class="text-ellipsis font-bold" href="' . esc_url($url) . '">' . esc_html($user->display_name) . '</a>';
|
||||
if (function_exists('aksrt_render_user_identity_chips')) {
|
||||
$user_name .= aksrt_render_user_identity_chips($user_id, 'comment');
|
||||
if (function_exists('jio_render_user_identity_chips')) {
|
||||
$user_name .= jio_render_user_identity_chips($user_id, 'comment');
|
||||
}
|
||||
}
|
||||
} elseif (!empty($comment->comment_author_url)) {
|
||||
@@ -113,14 +113,14 @@ if (!function_exists('aksrt_get_comments_user_name_html')) :
|
||||
|
||||
$badge = '';
|
||||
if ($show_author_tag && $is_post_author) {
|
||||
$badge .= '<span class="badg c-green badg-sm flex0 ml3">' . esc_html__('作者', 'aksrt') . '</span>';
|
||||
$badge .= '<span class="badg c-green badg-sm flex0 ml3">' . esc_html__('作者', 'jio') . '</span>';
|
||||
}
|
||||
|
||||
return '<name class="flex ac flex1">' . $topping . $user_name . $badge . '</name>';
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_comment_header_html')) :
|
||||
if (!function_exists('jio_get_comment_header_html')) :
|
||||
/**
|
||||
* Comment header (legacy: legacy).
|
||||
*
|
||||
@@ -128,11 +128,11 @@ if (!function_exists('aksrt_get_comment_header_html')) :
|
||||
* @param array<string,mixed> $settings Settings.
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_comment_header_html(WP_Comment $comment, array $settings = []): string {
|
||||
function jio_get_comment_header_html(WP_Comment $comment, array $settings = []): string {
|
||||
$like_enabled = !isset($settings['like_enabled']) || !empty($settings['like_enabled']);
|
||||
$avatar = aksrt_get_comment_avatar_box($comment, 'avatar-img comt-avatar');
|
||||
$name = aksrt_get_comments_user_name_html($comment, $settings);
|
||||
$like = aksrt_get_comment_like_html($comment, $like_enabled);
|
||||
$avatar = jio_get_comment_avatar_box($comment, 'avatar-img comt-avatar');
|
||||
$name = jio_get_comments_user_name_html($comment, $settings);
|
||||
$like = jio_get_comment_like_html($comment, $like_enabled);
|
||||
|
||||
$html = '<div class="author-box flex ac">';
|
||||
$html .= $avatar;
|
||||
@@ -144,17 +144,17 @@ if (!function_exists('aksrt_get_comment_header_html')) :
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_comment_report_html')) :
|
||||
if (!function_exists('jio_get_comment_report_html')) :
|
||||
/**
|
||||
* 评论举报入口 — 登录用户可举报他人评论(前台走 report.js 的 data-aksrt-report 契约)。
|
||||
* 评论举报入口 — 登录用户可举报他人评论(前台走 report.js 的 data-jio-report 契约)。
|
||||
*
|
||||
* 举报位于“回复”右侧三点下拉菜单内(参考主题同位置)。
|
||||
*
|
||||
* @param WP_Comment $comment Comment.
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_comment_report_html(WP_Comment $comment): string {
|
||||
if (!is_user_logged_in() || !class_exists('\AKSRT\Settings\Settings')) {
|
||||
function jio_get_comment_report_html(WP_Comment $comment): string {
|
||||
if (!is_user_logged_in() || !class_exists('\Jio\Settings\Settings')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -164,15 +164,15 @@ if (!function_exists('aksrt_get_comment_report_html')) :
|
||||
return '';
|
||||
}
|
||||
// 已封禁/小黑屋用户不再显示举报入口(参考主题 zib_get_report_link 排除语义)。
|
||||
if ($author_id > 0 && function_exists('aksrt_is_user_ban_restricted') && aksrt_is_user_ban_restricted($author_id)) {
|
||||
if ($author_id > 0 && function_exists('jio_is_user_ban_restricted') && jio_is_user_ban_restricted($author_id)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$settings = \AKSRT\Settings\Settings::get_user_identity_settings();
|
||||
$settings = \Jio\Settings\Settings::get_user_identity_settings();
|
||||
if (empty($settings['report']['enabled'])) {
|
||||
return '';
|
||||
}
|
||||
if (function_exists('aksrt_user_can') && !aksrt_user_can('user_report', $reporter_id, $author_id)) {
|
||||
if (function_exists('jio_user_can') && !jio_user_can('user_report', $reporter_id, $author_id)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -182,11 +182,11 @@ if (!function_exists('aksrt_get_comment_report_html')) :
|
||||
'target_name' => get_comment_author($comment),
|
||||
]);
|
||||
|
||||
return '<li><a class="comment-report-link" href="javascript:;" data-aksrt-report="' . esc_attr((string) $report_payload) . '"><i class="fa fas fa-exclamation-triangle mr10 fa-fw c-red" aria-hidden="true"></i>' . esc_html__('举报', 'aksrt') . '</a></li>';
|
||||
return '<li><a class="comment-report-link" href="javascript:;" data-jio-report="' . esc_attr((string) $report_payload) . '"><i class="fa fas fa-exclamation-triangle mr10 fa-fw c-red" aria-hidden="true"></i>' . esc_html__('举报', 'jio') . '</a></li>';
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_comments_action_dropdown_html')) :
|
||||
if (!function_exists('jio_get_comments_action_dropdown_html')) :
|
||||
/**
|
||||
* More-actions menu (legacy: legacy) — pin / edit / approve / delete.
|
||||
*
|
||||
@@ -194,52 +194,52 @@ if (!function_exists('aksrt_get_comments_action_dropdown_html')) :
|
||||
* @param int $depth Depth.
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_comments_action_dropdown_html(WP_Comment $comment, int $depth = 0): string {
|
||||
$perms = function_exists('aksrt_comment_action_permissions')
|
||||
? aksrt_comment_action_permissions($comment)
|
||||
function jio_get_comments_action_dropdown_html(WP_Comment $comment, int $depth = 0): string {
|
||||
$perms = function_exists('jio_comment_action_permissions')
|
||||
? jio_comment_action_permissions($comment)
|
||||
: ['can_edit' => false, 'can_delete' => false, 'can_moderate' => false, 'can_pin' => false];
|
||||
$is_pinned = function_exists('aksrt_is_comment_pinned') && aksrt_is_comment_pinned($comment);
|
||||
$is_pinned = function_exists('jio_is_comment_pinned') && jio_is_comment_pinned($comment);
|
||||
$is_pending = '0' === (string) $comment->comment_approved;
|
||||
$lists = '';
|
||||
|
||||
if (!empty($perms['can_pin']) && (int) $comment->comment_parent === 0) {
|
||||
$label = $is_pinned ? __('取消置顶', 'aksrt') : __('设置置顶', 'aksrt');
|
||||
$label = $is_pinned ? __('取消置顶', 'jio') : __('设置置顶', 'jio');
|
||||
// 不带 legacy 的 wp-ajax-submit 类:vendor main.min.js 会全局代理该类并向
|
||||
// admin-ajax 发空 action 请求(400 "0"),置顶走 data-comment-action REST。
|
||||
$lists .= '<li><a class="comment-topping" data-comment-action="pin" data-pinned="' . ($is_pinned ? '1' : '0') . '" href="javascript:;"><i class="fa fas fa-thumbtack mr10 fa-fw" aria-hidden="true"></i>' . esc_html($label) . '</a></li>';
|
||||
}
|
||||
if (!empty($perms['can_edit'])) {
|
||||
$lists .= '<li><a class="comment-edit-link" data-commentid="' . (int) $comment->comment_ID . '" data-postid="' . (int) $comment->comment_post_ID . '" href="javascript:;"><i class="fa fas fa-edit mr10 fa-fw" aria-hidden="true"></i>' . esc_html__('编辑', 'aksrt') . '</a></li>';
|
||||
$lists .= '<li><a class="comment-edit-link" data-commentid="' . (int) $comment->comment_ID . '" data-postid="' . (int) $comment->comment_post_ID . '" href="javascript:;"><i class="fa fas fa-edit mr10 fa-fw" aria-hidden="true"></i>' . esc_html__('编辑', 'jio') . '</a></li>';
|
||||
}
|
||||
if (!empty($perms['can_moderate'])) {
|
||||
$text = $is_pending ? __('批准', 'aksrt') : __('驳回', 'aksrt');
|
||||
$text = $is_pending ? __('批准', 'jio') : __('驳回', 'jio');
|
||||
$class = $is_pending ? 'approve' : 'unapprove';
|
||||
$action = $is_pending ? 'approve' : 'hold';
|
||||
$approve_icon = function_exists('aksrt_get_comment_icon') ? aksrt_get_comment_icon('approve', 'mr10 icon fa-fw') : '';
|
||||
$approve_icon = function_exists('jio_get_comment_icon') ? jio_get_comment_icon('approve', 'mr10 icon fa-fw') : '';
|
||||
$lists .= '<li><a class="comment-approve-link ' . $class . '" data-comment-action="' . $action . '" data-commentid="' . (int) $comment->comment_ID . '" data-postid="' . (int) $comment->comment_post_ID . '" href="javascript:;">' . $approve_icon . '<text>' . esc_html($text) . '</text></a></li>';
|
||||
}
|
||||
if (!empty($perms['can_delete'])) {
|
||||
$lists .= '<li><a class="comment-trash-link c-red" data-comment-action="delete" data-commentid="' . (int) $comment->comment_ID . '" data-postid="' . (int) $comment->comment_post_ID . '" href="javascript:;"><i class="fa far fa-trash-alt mr10 fa-fw" aria-hidden="true"></i>' . esc_html__('删除', 'aksrt') . '</a></li>';
|
||||
$lists .= '<li><a class="comment-trash-link c-red" data-comment-action="delete" data-commentid="' . (int) $comment->comment_ID . '" data-postid="' . (int) $comment->comment_post_ID . '" href="javascript:;"><i class="fa far fa-trash-alt mr10 fa-fw" aria-hidden="true"></i>' . esc_html__('删除', 'jio') . '</a></li>';
|
||||
}
|
||||
// 末项(参考主题 comments_action_lists 钩子顺序):管理员 → 禁封用户;
|
||||
// 否则 → 举报(登录且非本人且举报开启时,既有评论举报契约)。
|
||||
$lists .= aksrt_get_comment_ban_or_report_item($comment);
|
||||
$lists .= jio_get_comment_ban_or_report_item($comment);
|
||||
|
||||
if ($lists === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
$menu_icon = function_exists('aksrt_get_comment_icon') ? aksrt_get_comment_icon('menu_2') : '';
|
||||
// 交互由主题自有 comments.js 委托处理(data-aksrt-comment-drop),
|
||||
$menu_icon = function_exists('jio_get_comment_icon') ? jio_get_comment_icon('menu_2') : '';
|
||||
// 交互由主题自有 comments.js 委托处理(data-jio-comment-drop),
|
||||
// 不用 vendor 的 data-toggle="dropdown" 遗留委托:该链路在部分环境
|
||||
// 未注册/被早退,导致三点菜单点不开。open 类驱动的 CSS 契约不变。
|
||||
$icon_a = '<a href="javascript:;" class="muted-color padding-6" data-aksrt-comment-drop aria-haspopup="true" aria-expanded="false" aria-label="' . esc_attr__('更多操作', 'aksrt') . '">' . $menu_icon . '</a>';
|
||||
$icon_a = '<a href="javascript:;" class="muted-color padding-6" data-jio-comment-drop aria-haspopup="true" aria-expanded="false" aria-label="' . esc_attr__('更多操作', 'jio') . '">' . $menu_icon . '</a>';
|
||||
|
||||
return '<span class="dropdown drop-fixed-sm padding-6">' . $icon_a . '<ul class="dropdown-menu">' . $lists . '</ul></span>';
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_comment_footer_html')) :
|
||||
if (!function_exists('jio_get_comment_footer_html')) :
|
||||
/**
|
||||
* comt-meta row (legacy: legacy).
|
||||
*
|
||||
@@ -249,25 +249,25 @@ if (!function_exists('aksrt_get_comment_footer_html')) :
|
||||
* @param array<string,mixed> $settings Settings.
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_comment_footer_html(WP_Comment $comment, array $args, int $depth, array $settings = []): string {
|
||||
function jio_get_comment_footer_html(WP_Comment $comment, array $args, int $depth, array $settings = []): string {
|
||||
$is_pending = '0' === (string) $comment->comment_approved;
|
||||
|
||||
$is_mobile = wp_is_mobile();
|
||||
|
||||
$badg_approve = '';
|
||||
if ($is_pending) {
|
||||
$badg_approve = '<span class="badg c-red badg-sm">' . esc_html__('待审核', 'aksrt') . '</span>';
|
||||
$badg_approve = '<span class="badg c-red badg-sm">' . esc_html__('待审核', 'jio') . '</span>';
|
||||
}
|
||||
$badg_approve = '<span class="badge-approve">' . $badg_approve . '</span>';
|
||||
|
||||
$absolute = date_i18n(__('Y年m月d日 H:i:s', 'aksrt'), strtotime((string) $comment->comment_date));
|
||||
$ago = function_exists('aksrt_time_ago')
|
||||
? aksrt_time_ago((string) $comment->comment_date)
|
||||
: human_time_diff(strtotime((string) $comment->comment_date), current_time('timestamp')) . __('前', 'aksrt');
|
||||
$absolute = date_i18n(__('Y年m月d日 H:i:s', 'jio'), strtotime((string) $comment->comment_date));
|
||||
$ago = function_exists('jio_time_ago')
|
||||
? jio_time_ago((string) $comment->comment_date)
|
||||
: human_time_diff(strtotime((string) $comment->comment_date), current_time('timestamp')) . __('前', 'jio');
|
||||
$time_html = '<span class="comt-author"' . ($is_mobile ? ' data-toggle="tooltip"' : '') . ' title="' . esc_attr($absolute) . '">' . esc_html($ago) . '</span>';
|
||||
|
||||
$city_html = function_exists('aksrt_get_comment_city_badge_html')
|
||||
? aksrt_get_comment_city_badge_html($comment)
|
||||
$city_html = function_exists('jio_get_comment_city_badge_html')
|
||||
? jio_get_comment_city_badge_html($comment)
|
||||
: '';
|
||||
|
||||
$parent_html = '';
|
||||
@@ -282,8 +282,8 @@ if (!function_exists('aksrt_get_comment_footer_html')) :
|
||||
$link = get_comment_reply_link(
|
||||
[
|
||||
'add_below' => 'div-comment',
|
||||
'reply_text' => __('回复', 'aksrt'),
|
||||
'login_text' => __('回复', 'aksrt'),
|
||||
'reply_text' => __('回复', 'jio'),
|
||||
'login_text' => __('回复', 'jio'),
|
||||
'depth' => $depth,
|
||||
'max_depth' => $max_depth,
|
||||
],
|
||||
@@ -305,14 +305,14 @@ if (!function_exists('aksrt_get_comment_footer_html')) :
|
||||
}
|
||||
}
|
||||
|
||||
$actions = aksrt_get_comments_action_dropdown_html($comment, $depth);
|
||||
$actions = jio_get_comments_action_dropdown_html($comment, $depth);
|
||||
$info = $time_html . $city_html . $parent_html . $badg_approve . $reply_html;
|
||||
|
||||
return '<div class="comt-meta muted-2-color">' . $info . $actions . '</div>';
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_comments_list_html')) :
|
||||
if (!function_exists('jio_get_comments_list_html')) :
|
||||
/**
|
||||
* Single comment item HTML (legacy: legacy).
|
||||
*
|
||||
@@ -322,13 +322,13 @@ if (!function_exists('aksrt_get_comments_list_html')) :
|
||||
* @param array $settings Settings.
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_comments_list_html(WP_Comment $comment, array $args = [], int $depth = 0, array $settings = []): string {
|
||||
function jio_get_comments_list_html(WP_Comment $comment, array $args = [], int $depth = 0, array $settings = []): string {
|
||||
$comment_id = (int) $comment->comment_ID;
|
||||
$con = function_exists('aksrt_render_comment_content')
|
||||
? aksrt_render_comment_content((string) get_comment_text($comment))
|
||||
$con = function_exists('jio_render_comment_content')
|
||||
? jio_render_comment_content((string) get_comment_text($comment))
|
||||
: wp_kses_post((string) get_comment_text($comment));
|
||||
$header = aksrt_get_comment_header_html($comment, $settings);
|
||||
$footer = aksrt_get_comment_footer_html($comment, $args, $depth, $settings);
|
||||
$header = jio_get_comment_header_html($comment, $settings);
|
||||
$footer = jio_get_comment_footer_html($comment, $args, $depth, $settings);
|
||||
|
||||
$html = '<li ' . comment_class('', $comment, null, false) . ' id="comment-' . esc_attr((string) $comment_id) . '">';
|
||||
$html .= '<ul class="list-inline">';
|
||||
@@ -344,7 +344,7 @@ if (!function_exists('aksrt_get_comments_list_html')) :
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_comment_callback')) :
|
||||
if (!function_exists('jio_comment_callback')) :
|
||||
/**
|
||||
* Canonical wp_list_comments callback (legacy: legacy).
|
||||
*
|
||||
@@ -354,15 +354,15 @@ if (!function_exists('aksrt_comment_callback')) :
|
||||
* @param array $args Args.
|
||||
* @param int $depth Depth.
|
||||
*/
|
||||
function aksrt_comment_callback($comment, $args, $depth) {
|
||||
function jio_comment_callback($comment, $args, $depth) {
|
||||
$GLOBALS['comment'] = $comment;
|
||||
$settings = get_query_var('aksrt_comment_settings', []);
|
||||
$settings = get_query_var('jio_comment_settings', []);
|
||||
$settings = is_array($settings) ? $settings : [];
|
||||
if (empty($settings) && class_exists('\AKSRT\Settings\Settings')) {
|
||||
$settings = \AKSRT\Settings\Settings::get_comment_display_settings();
|
||||
if (empty($settings) && class_exists('\Jio\Settings\Settings')) {
|
||||
$settings = \Jio\Settings\Settings::get_comment_display_settings();
|
||||
}
|
||||
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- composed helpers escape.
|
||||
echo aksrt_get_comments_list_html($comment, is_array($args) ? $args : [], (int) $depth, $settings);
|
||||
echo jio_get_comments_list_html($comment, is_array($args) ? $args : [], (int) $depth, $settings);
|
||||
}
|
||||
endif;
|
||||
Reference in new issue
Block a user