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
@@ -2,13 +2,13 @@
|
||||
/**
|
||||
* 后台代发系统消息:收件人解析(用户列表 / 角色)+ 逐人投递。
|
||||
*
|
||||
* 逐人走 Message::send(),因此每位收件人都会触发 aksrt_notification_sent
|
||||
* 逐人走 Message::send(),因此每位收件人都会触发 jio_notification_sent
|
||||
* (邮件 / 公众号提醒按通知设置执行),收件人上限即为该扇出的上限。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
namespace AKSRT\Messages;
|
||||
namespace Jio\Messages;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -29,10 +29,10 @@ final class AdminBroadcast {
|
||||
$tokens = preg_split('/[\s,,;;]+/u', trim($raw), -1, PREG_SPLIT_NO_EMPTY) ?: [];
|
||||
$tokens = array_values(array_unique($tokens));
|
||||
if ($tokens === []) {
|
||||
return new \WP_Error('empty', __('请填写收件人。', 'aksrt'));
|
||||
return new \WP_Error('empty', __('请填写收件人。', 'jio'));
|
||||
}
|
||||
if (count($tokens) > self::MAX_USERS) {
|
||||
return new \WP_Error('too_many', sprintf(__('单次最多指定 %d 位用户。', 'aksrt'), self::MAX_USERS));
|
||||
return new \WP_Error('too_many', sprintf(__('单次最多指定 %d 位用户。', 'jio'), self::MAX_USERS));
|
||||
}
|
||||
|
||||
$ids = [];
|
||||
@@ -57,7 +57,7 @@ final class AdminBroadcast {
|
||||
/** @return list<int>|\WP_Error */
|
||||
public static function resolve_role(string $role) {
|
||||
if ($role === '' || !isset(wp_roles()->roles[$role])) {
|
||||
return new \WP_Error('bad_role', __('请选择有效的用户角色。', 'aksrt'));
|
||||
return new \WP_Error('bad_role', __('请选择有效的用户角色。', 'jio'));
|
||||
}
|
||||
$ids = array_map('intval', get_users([
|
||||
'role' => $role,
|
||||
@@ -66,10 +66,10 @@ final class AdminBroadcast {
|
||||
'count_total' => false,
|
||||
]));
|
||||
if ($ids === []) {
|
||||
return new \WP_Error('empty_role', __('该角色下没有用户。', 'aksrt'));
|
||||
return new \WP_Error('empty_role', __('该角色下没有用户。', 'jio'));
|
||||
}
|
||||
if (count($ids) > self::MAX_ROLE_USERS) {
|
||||
return new \WP_Error('role_too_large', sprintf(__('该角色用户超过 %d 人,请改用更精确的收件人。', 'aksrt'), self::MAX_ROLE_USERS));
|
||||
return new \WP_Error('role_too_large', sprintf(__('该角色用户超过 %d 人,请改用更精确的收件人。', 'jio'), self::MAX_ROLE_USERS));
|
||||
}
|
||||
return $ids;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
namespace AKSRT\Messages;
|
||||
namespace Jio\Messages;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -77,7 +77,7 @@ class Message {
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送站内通知(持久化到 aksrt_notification 表)
|
||||
* 发送站内通知(持久化到 jio_notification 表)
|
||||
*
|
||||
* @param int $to_user_id 接收人 ID
|
||||
* @param string $type 通知类型 (comment_reply, download_ready, notice, ...)
|
||||
@@ -103,7 +103,7 @@ class Message {
|
||||
if ($inserted === false) return false;
|
||||
|
||||
// 触发通知钩子
|
||||
do_action('aksrt_notification_sent', $to_user_id, $type, array_merge($data, [
|
||||
do_action('jio_notification_sent', $to_user_id, $type, array_merge($data, [
|
||||
'description' => $content,
|
||||
]));
|
||||
|
||||
@@ -148,8 +148,8 @@ class Message {
|
||||
}
|
||||
|
||||
private function table(): string {
|
||||
if (class_exists('\AKSRT\Core\DBMigrator')) {
|
||||
return \AKSRT\Core\DBMigrator::table('notification');
|
||||
if (class_exists('\Jio\Core\DBMigrator')) {
|
||||
return \Jio\Core\DBMigrator::table('notification');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
* 前台消息中心只按「文章评论 / 点赞喜欢 / 系统通知」三类归档(inc/modules/message-center.php),
|
||||
* 后台运营需要看到原始类型,因此这里维护一份细粒度标签。未登记的类型原样显示键名。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
namespace AKSRT\Messages;
|
||||
namespace Jio\Messages;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -17,31 +17,31 @@ final class MessageTypes {
|
||||
/** @return array<string,string> */
|
||||
public static function labels(): array {
|
||||
return [
|
||||
'system' => __('系统通知', 'aksrt'),
|
||||
'notice' => __('通知', 'aksrt'),
|
||||
'comment' => __('文章评论', 'aksrt'),
|
||||
'comment_reply' => __('评论回复', 'aksrt'),
|
||||
'comment_approved' => __('评论审核', 'aksrt'),
|
||||
'pending_comments' => __('待审核评论', 'aksrt'),
|
||||
'comment_like' => __('评论点赞', 'aksrt'),
|
||||
'post_like' => __('文章点赞', 'aksrt'),
|
||||
'post_favorite' => __('文章收藏', 'aksrt'),
|
||||
'followed' => __('新增关注', 'aksrt'),
|
||||
'download_ready' => __('下载就绪', 'aksrt'),
|
||||
'level_up' => __('等级提升', 'aksrt'),
|
||||
'medal' => __('徽章授予', 'aksrt'),
|
||||
'auth_apply_reply' => __('认证审核', 'aksrt'),
|
||||
'ban_appeal' => __('禁封申诉', 'aksrt'),
|
||||
'report' => __('举报', 'aksrt'),
|
||||
'withdraw' => __('提现', 'aksrt'),
|
||||
'ticket_new' => __('新工单', 'aksrt'),
|
||||
'ticket_reply' => __('工单回复', 'aksrt'),
|
||||
'ticket_urge' => __('工单催单', 'aksrt'),
|
||||
'ticket_closed' => __('工单关闭', 'aksrt'),
|
||||
'asset_balance_increase' => __('余额增加', 'aksrt'),
|
||||
'asset_balance_decrease' => __('余额减少', 'aksrt'),
|
||||
'asset_points_increase' => __('积分增加', 'aksrt'),
|
||||
'asset_points_decrease' => __('积分减少', 'aksrt'),
|
||||
'system' => __('系统通知', 'jio'),
|
||||
'notice' => __('通知', 'jio'),
|
||||
'comment' => __('文章评论', 'jio'),
|
||||
'comment_reply' => __('评论回复', 'jio'),
|
||||
'comment_approved' => __('评论审核', 'jio'),
|
||||
'pending_comments' => __('待审核评论', 'jio'),
|
||||
'comment_like' => __('评论点赞', 'jio'),
|
||||
'post_like' => __('文章点赞', 'jio'),
|
||||
'post_favorite' => __('文章收藏', 'jio'),
|
||||
'followed' => __('新增关注', 'jio'),
|
||||
'download_ready' => __('下载就绪', 'jio'),
|
||||
'level_up' => __('等级提升', 'jio'),
|
||||
'medal' => __('徽章授予', 'jio'),
|
||||
'auth_apply_reply' => __('认证审核', 'jio'),
|
||||
'ban_appeal' => __('禁封申诉', 'jio'),
|
||||
'report' => __('举报', 'jio'),
|
||||
'withdraw' => __('提现', 'jio'),
|
||||
'ticket_new' => __('新工单', 'jio'),
|
||||
'ticket_reply' => __('工单回复', 'jio'),
|
||||
'ticket_urge' => __('工单催单', 'jio'),
|
||||
'ticket_closed' => __('工单关闭', 'jio'),
|
||||
'asset_balance_increase' => __('余额增加', 'jio'),
|
||||
'asset_balance_decrease' => __('余额减少', 'jio'),
|
||||
'asset_points_increase' => __('积分增加', 'jio'),
|
||||
'asset_points_decrease' => __('积分减少', 'jio'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
* 全站视角(不按当前用户过滤),仅供 manage_options 的原生后台页使用;
|
||||
* 用户自身收件箱读写仍走 Message / inc/modules/user-notifications.php。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
namespace AKSRT\Messages;
|
||||
namespace Jio\Messages;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -21,7 +21,7 @@ final class NotificationAdminQuery {
|
||||
private const COLUMNS = 'id, user_id, type, title, description, target_url, is_read, created_at, read_at';
|
||||
|
||||
public static function table(): string {
|
||||
return class_exists('\AKSRT\Core\DBMigrator') ? \AKSRT\Core\DBMigrator::table('notification') : '';
|
||||
return class_exists('\Jio\Core\DBMigrator') ? \Jio\Core\DBMigrator::table('notification') : '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
namespace AKSRT\Messages;
|
||||
namespace Jio\Messages;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -17,7 +17,7 @@ class ReportCenter {
|
||||
}
|
||||
|
||||
private function table(): string {
|
||||
return class_exists('\AKSRT\Core\DBMigrator') ? \AKSRT\Core\DBMigrator::table('report') : '';
|
||||
return class_exists('\Jio\Core\DBMigrator') ? \Jio\Core\DBMigrator::table('report') : '';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,7 +57,7 @@ class ReportCenter {
|
||||
$id = $wpdb->insert_id ? (int) $wpdb->insert_id : 0;
|
||||
if ($id > 0) {
|
||||
$this->notify_admins_new_report($reporter_id, $target_type, $target_id, $category, $reason);
|
||||
do_action('aksrt_report_submitted', $id, [
|
||||
do_action('jio_report_submitted', $id, [
|
||||
'reporter_id' => $reporter_id,
|
||||
'target_type' => $target_type,
|
||||
'target_id' => $target_id,
|
||||
@@ -72,14 +72,14 @@ class ReportCenter {
|
||||
* 举报提交 → 管理员站内信(与禁封申诉同模式:直达工单列表)。
|
||||
*/
|
||||
private function notify_admins_new_report(int $reporter_id, string $target_type, int $target_id, string $category, string $reason): void {
|
||||
if (!class_exists('\AKSRT\Messages\Message') || !class_exists('WP_User_Query')) return;
|
||||
$type_labels = ['post' => __('文章', 'aksrt'), 'comment' => __('评论', 'aksrt'), 'user' => __('用户', 'aksrt')];
|
||||
if (!class_exists('\Jio\Messages\Message') || !class_exists('WP_User_Query')) return;
|
||||
$type_labels = ['post' => __('文章', 'jio'), 'comment' => __('评论', 'jio'), 'user' => __('用户', 'jio')];
|
||||
$reporter = get_userdata($reporter_id);
|
||||
$summary = $category . ($reason !== '' ? ':' . $reason : '');
|
||||
$content = sprintf(
|
||||
/* translators: 1: reporter name 2: target type 3: target id 4: report summary */
|
||||
__('用户 %1$s 举报了%2$s #%3$d:%4$s', 'aksrt'),
|
||||
$reporter instanceof \WP_User ? $reporter->display_name : __('匿名用户', 'aksrt'),
|
||||
__('用户 %1$s 举报了%2$s #%3$d:%4$s', 'jio'),
|
||||
$reporter instanceof \WP_User ? $reporter->display_name : __('匿名用户', 'jio'),
|
||||
$type_labels[$target_type] ?? $target_type,
|
||||
$target_id,
|
||||
mb_substr($summary, 0, 80)
|
||||
@@ -91,9 +91,9 @@ class ReportCenter {
|
||||
'report',
|
||||
$content,
|
||||
[
|
||||
'title' => __('用户举报', 'aksrt'),
|
||||
'title' => __('用户举报', 'jio'),
|
||||
// 直达待处理举报队列(参考主题 admin.php?page=user_ban&type=report&status=0 同语义)。
|
||||
'target_url' => admin_url('users.php?page=aksrt_user_ban&type=report&status=pending'),
|
||||
'target_url' => admin_url('users.php?page=jio_user_ban&type=report&status=pending'),
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -105,13 +105,13 @@ class ReportCenter {
|
||||
private function notify_reporter_status_changed(int $reporter_id, string $new_status, string $note): void {
|
||||
if ($reporter_id <= 0) return;
|
||||
$labels = [
|
||||
'pending' => __('待处理', 'aksrt'),
|
||||
'reviewing' => __('审核中', 'aksrt'),
|
||||
'resolved' => __('已解决', 'aksrt'),
|
||||
'dismissed' => __('已驳回', 'aksrt'),
|
||||
'pending' => __('待处理', 'jio'),
|
||||
'reviewing' => __('审核中', 'jio'),
|
||||
'resolved' => __('已解决', 'jio'),
|
||||
'dismissed' => __('已驳回', 'jio'),
|
||||
];
|
||||
$content = sprintf(__('您提交的举报已有处理结果:%1$s。%2$s', 'aksrt'), $labels[$new_status] ?? $new_status, $note !== '' ? sprintf(__('处理说明:%s', 'aksrt'), $note) : '');
|
||||
Message::get_instance()->send($reporter_id, 'report', $content, ['title' => __('举报处理结果', 'aksrt')]);
|
||||
$content = sprintf(__('您提交的举报已有处理结果:%1$s。%2$s', 'jio'), $labels[$new_status] ?? $new_status, $note !== '' ? sprintf(__('处理说明:%s', 'jio'), $note) : '');
|
||||
Message::get_instance()->send($reporter_id, 'report', $content, ['title' => __('举报处理结果', 'jio')]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,7 +207,7 @@ class ReportCenter {
|
||||
$result = $wpdb->update($table, $update_data, ['id' => $report_id], $format, ['%d']);
|
||||
if ($result !== false) {
|
||||
// 第 4 参携带处理说明:邮件通知(report_result)与站内信均需反馈给举报人。
|
||||
do_action('aksrt_report_status_changed', $report_id, (int) ($existing->reporter_id ?? 0), $new_status, $note_clean);
|
||||
do_action('jio_report_status_changed', $report_id, (int) ($existing->reporter_id ?? 0), $new_status, $note_clean);
|
||||
$this->notify_reporter_status_changed((int) ($existing->reporter_id ?? 0), $new_status, $note_clean);
|
||||
}
|
||||
return $result !== false;
|
||||
@@ -228,35 +228,35 @@ class ReportCenter {
|
||||
}
|
||||
|
||||
if ($target_type === 'user') {
|
||||
if (!class_exists('\AKSRT\User\Restriction')) {
|
||||
if (!class_exists('\Jio\User\Restriction')) {
|
||||
return '';
|
||||
}
|
||||
$svc = \AKSRT\User\Restriction::get_instance();
|
||||
$svc = \Jio\User\Restriction::get_instance();
|
||||
|
||||
if ($action_taken === 'clear') {
|
||||
$removed = $svc->lift_user_restriction($target_id);
|
||||
return $removed > 0
|
||||
? sprintf(__('已解除 %d 条生效中的限制', 'aksrt'), $removed)
|
||||
: __('该用户没有生效中的限制', 'aksrt');
|
||||
? sprintf(__('已解除 %d 条生效中的限制', 'jio'), $removed)
|
||||
: __('该用户没有生效中的限制', 'jio');
|
||||
}
|
||||
|
||||
if (in_array($action_taken, \AKSRT\User\Restriction::TYPES, true)) {
|
||||
if (in_array($action_taken, \Jio\User\Restriction::TYPES, true)) {
|
||||
$labels = [
|
||||
\AKSRT\User\Restriction::TYPE_WARN => __('警告', 'aksrt'),
|
||||
\AKSRT\User\Restriction::TYPE_MUTE => __('禁言', 'aksrt'),
|
||||
\AKSRT\User\Restriction::TYPE_SUSPEND => __('停权', 'aksrt'),
|
||||
\AKSRT\User\Restriction::TYPE_BAN => __('封禁', 'aksrt'),
|
||||
\Jio\User\Restriction::TYPE_WARN => __('警告', 'jio'),
|
||||
\Jio\User\Restriction::TYPE_MUTE => __('禁言', 'jio'),
|
||||
\Jio\User\Restriction::TYPE_SUSPEND => __('停权', 'jio'),
|
||||
\Jio\User\Restriction::TYPE_BAN => __('封禁', 'jio'),
|
||||
];
|
||||
$result = $svc->restrict(
|
||||
$target_id,
|
||||
$action_taken,
|
||||
$reason !== '' ? $reason : __('举报处理处罚', 'aksrt'),
|
||||
\AKSRT\User\Restriction::SCOPE_GLOBAL,
|
||||
$reason !== '' ? $reason : __('举报处理处罚', 'jio'),
|
||||
\Jio\User\Restriction::SCOPE_GLOBAL,
|
||||
'',
|
||||
get_current_user_id()
|
||||
);
|
||||
if (!empty($result['success'])) {
|
||||
return sprintf(__('已对用户执行限制:%s', 'aksrt'), $labels[$action_taken] ?? $action_taken);
|
||||
return sprintf(__('已对用户执行限制:%s', 'jio'), $labels[$action_taken] ?? $action_taken);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@@ -269,12 +269,12 @@ class ReportCenter {
|
||||
'ID' => $target_id,
|
||||
'post_status' => 'pending',
|
||||
]);
|
||||
return __('已将内容改为待审状态', 'aksrt');
|
||||
return __('已将内容改为待审状态', 'jio');
|
||||
}
|
||||
|
||||
if ($action_taken === 'content_removed' && $target_type === 'comment' && get_comment($target_id)) {
|
||||
wp_set_comment_status($target_id, 'hold', true);
|
||||
return __('已将评论改为待审状态', 'aksrt');
|
||||
return __('已将评论改为待审状态', 'jio');
|
||||
}
|
||||
|
||||
return '';
|
||||
|
||||
+20
-20
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
namespace AKSRT\Messages;
|
||||
namespace Jio\Messages;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -29,9 +29,9 @@ class SiteNotice {
|
||||
* and current user matches the target audience (policy).
|
||||
*/
|
||||
private function is_active(): bool {
|
||||
if (!class_exists('\AKSRT\Settings\Settings')) return false;
|
||||
if (!class_exists('\Jio\Settings\Settings')) return false;
|
||||
|
||||
$cfg = \AKSRT\Settings\Settings::get_system_notice_config();
|
||||
$cfg = \Jio\Settings\Settings::get_system_notice_config();
|
||||
if (!$cfg['enabled'] || $cfg['content'] === '') {
|
||||
return false;
|
||||
}
|
||||
@@ -47,11 +47,11 @@ class SiteNotice {
|
||||
break;
|
||||
|
||||
case 'vip':
|
||||
if (!function_exists('aksrt_is_vip') || !aksrt_is_vip($user_id)) return false;
|
||||
if (!function_exists('jio_is_vip') || !jio_is_vip($user_id)) return false;
|
||||
break;
|
||||
|
||||
case 'free':
|
||||
if (function_exists('aksrt_is_vip') && aksrt_is_vip($user_id)) return false;
|
||||
if (function_exists('jio_is_vip') && jio_is_vip($user_id)) return false;
|
||||
break;
|
||||
|
||||
case 'auth':
|
||||
@@ -67,8 +67,8 @@ class SiteNotice {
|
||||
|
||||
// 过期检查:expires 为小时数,0=永不过期
|
||||
$expires_hours = (int) $cfg['expires'];
|
||||
if ($expires_hours > 0 && isset($_COOKIE['aksrt_notice_seen'])) {
|
||||
$seen_ts = absint($_COOKIE['aksrt_notice_seen']);
|
||||
if ($expires_hours > 0 && isset($_COOKIE['jio_notice_seen'])) {
|
||||
$seen_ts = absint($_COOKIE['jio_notice_seen']);
|
||||
if ($seen_ts > 0 && (time() - $seen_ts) < ($expires_hours * 3600)) {
|
||||
return false;
|
||||
}
|
||||
@@ -83,9 +83,9 @@ class SiteNotice {
|
||||
public function render_notice(): void {
|
||||
if (!$this->is_active()) return;
|
||||
|
||||
$cfg = \AKSRT\Settings\Settings::get_system_notice_config();
|
||||
$cfg = \Jio\Settings\Settings::get_system_notice_config();
|
||||
$content = wp_kses_post($cfg['content']);
|
||||
$title = esc_html($cfg['title'] ?: __('站点公告', 'aksrt'));
|
||||
$title = esc_html($cfg['title'] ?: __('站点公告', 'jio'));
|
||||
$extra_cls = $cfg['class'] ? ' ' . esc_attr($cfg['class']) : '';
|
||||
$radius = absint($cfg['radius']);
|
||||
$size_cls = $cfg['size'];
|
||||
@@ -96,7 +96,7 @@ class SiteNotice {
|
||||
$title_style = $cfg['title_style'] ? ' style="' . esc_attr($cfg['title_style']) . '"' : '';
|
||||
|
||||
// 弹窗尺寸 class
|
||||
$dialog_cls = 'aksrt-site-notice__dialog';
|
||||
$dialog_cls = 'jio-site-notice__dialog';
|
||||
if ($size_cls !== '') {
|
||||
$dialog_cls .= ' ' . esc_attr($size_cls);
|
||||
}
|
||||
@@ -109,29 +109,29 @@ class SiteNotice {
|
||||
|
||||
$buttons = $cfg['buttons'];
|
||||
?>
|
||||
<div id="aksrt-site-notice"
|
||||
class="aksrt-site-notice<?php echo $extra_cls; ?>"
|
||||
<div id="jio-site-notice"
|
||||
class="jio-site-notice<?php echo $extra_cls; ?>"
|
||||
data-expires="<?php echo esc_attr($cfg['expires']); ?>"
|
||||
style="<?php echo esc_attr($dialog_style); ?>">
|
||||
<div class="aksrt-site-notice__overlay"></div>
|
||||
<div class="jio-site-notice__overlay"></div>
|
||||
<div class="<?php echo $dialog_cls; ?>">
|
||||
<div class="aksrt-site-notice__head">
|
||||
<h3 class="aksrt-site-notice__title<?php echo $title_cls; ?>"<?php echo $title_style; ?>>
|
||||
<div class="jio-site-notice__head">
|
||||
<h3 class="jio-site-notice__title<?php echo $title_cls; ?>"<?php echo $title_style; ?>>
|
||||
<?php if ($title_icon): ?><i class="<?php echo esc_attr($title_icon); ?>"></i> <?php endif; ?>
|
||||
<?php echo $title; ?>
|
||||
</h3>
|
||||
<button type="button" class="aksrt-site-notice__close" aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>">
|
||||
<button type="button" class="jio-site-notice__close" aria-label="<?php esc_attr_e('关闭', 'jio'); ?>">
|
||||
<i class="fa fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="aksrt-site-notice__body">
|
||||
<div class="jio-site-notice__body">
|
||||
<?php echo $content; ?>
|
||||
</div>
|
||||
<?php if (!empty($buttons)): ?>
|
||||
<div class="aksrt-site-notice__foot">
|
||||
<div class="jio-site-notice__foot">
|
||||
<?php foreach ($buttons as $btn): ?>
|
||||
<?php
|
||||
$btn_cls = 'aksrt-site-notice__btn aksrt-site-notice__btn--' . esc_attr($btn['color']);
|
||||
$btn_cls = 'jio-site-notice__btn jio-site-notice__btn--' . esc_attr($btn['color']);
|
||||
if ($btn['link']):
|
||||
?>
|
||||
<a href="<?php echo esc_url($btn['link']); ?>" class="<?php echo $btn_cls; ?>"><?php echo esc_html($btn['text']); ?></a>
|
||||
|
||||
Reference in new issue
Block a user