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
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - 文章归档
|
||||
* Template Name: Jio - 文章归档
|
||||
* Template Post Type: page
|
||||
*
|
||||
* legacy pages/archives.php 1:1 — month groups with view/comment/like meta,
|
||||
* theme-box shell, sidebar + comments.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -20,14 +20,14 @@ $header_style = (string) get_post_meta(get_queried_object_id(), 'page_header_sty
|
||||
<div class="content-layout">
|
||||
<?php if ($header_style !== '1' && $header_style !== 'not') : ?>
|
||||
<div class="theme-box radius8 main-bg main-shadow box-body mb20">
|
||||
<h1 class="article-title"><?php echo esc_html(get_the_title() ?: __('文章归档', 'aksrt')); ?></h1>
|
||||
<h1 class="article-title"><?php echo esc_html(get_the_title() ?: __('文章归档', 'jio')); ?></h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="theme-box radius8 main-bg main-shadow">
|
||||
<?php if ($header_style === '1') : ?>
|
||||
<div class="box-body">
|
||||
<h1 class="article-title"><?php echo esc_html(get_the_title() ?: __('文章归档', 'aksrt')); ?></h1>
|
||||
<h1 class="article-title"><?php echo esc_html(get_the_title() ?: __('文章归档', 'jio')); ?></h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<article class="box-body">
|
||||
@@ -55,7 +55,7 @@ $header_style = (string) get_post_meta(get_queried_object_id(), 'page_header_sty
|
||||
if ($ul_open) {
|
||||
echo '</ul></div>';
|
||||
}
|
||||
echo '<div class="aksrt-panel mb20"><h4 class="text-center title-h-center">';
|
||||
echo '<div class="jio-panel mb20"><h4 class="text-center title-h-center">';
|
||||
echo esc_html(get_the_time('Y年n月', $post));
|
||||
echo '</h4><ul class="list-inline archives-month-list">';
|
||||
$ul_open = true;
|
||||
@@ -63,28 +63,28 @@ $header_style = (string) get_post_meta(get_queried_object_id(), 'page_header_sty
|
||||
$previous_month = $month;
|
||||
endif;
|
||||
|
||||
$views = function_exists('aksrt_get_post_views') ? (int) aksrt_get_post_views($post->ID) : 0;
|
||||
$views = function_exists('jio_get_post_views') ? (int) jio_get_post_views($post->ID) : 0;
|
||||
$likes = (int) get_post_meta($post->ID, 'like', true);
|
||||
if ($likes <= 0) {
|
||||
$likes = (int) get_post_meta($post->ID, 'aksrt_like', true);
|
||||
$likes = (int) get_post_meta($post->ID, 'jio_like', true);
|
||||
}
|
||||
$comments = (int) get_comments_number($post->ID);
|
||||
?>
|
||||
<li class="author-set-left muted-color">
|
||||
<time datetime="<?php echo esc_attr(get_the_date('c', $post)); ?>"><?php echo esc_html((string) $day); ?><?php esc_html_e('日', 'aksrt'); ?></time>
|
||||
<time datetime="<?php echo esc_attr(get_the_date('c', $post)); ?>"><?php echo esc_html((string) $day); ?><?php esc_html_e('日', 'jio'); ?></time>
|
||||
</li>
|
||||
<li class="author-set-right">
|
||||
<a href="<?php echo esc_url(get_permalink($post)); ?>"><?php echo esc_html(get_the_title($post)); ?></a>
|
||||
<span class="muted-2-color ml6" title="<?php esc_attr_e('阅读', 'aksrt'); ?>">
|
||||
<span class="muted-2-color ml6" title="<?php esc_attr_e('阅读', 'jio'); ?>">
|
||||
<i class="fa fas fa-eye" aria-hidden="true"></i><?php echo esc_html((string) $views); ?>
|
||||
</span>
|
||||
<?php if ($comments > 0) : ?>
|
||||
<span class="muted-2-color ml6" title="<?php esc_attr_e('评论', 'aksrt'); ?>">
|
||||
<span class="muted-2-color ml6" title="<?php esc_attr_e('评论', 'jio'); ?>">
|
||||
<i class="fa fas fa-comment" aria-hidden="true"></i><?php echo esc_html((string) $comments); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php if ($likes > 0) : ?>
|
||||
<span class="muted-2-color ml6" title="<?php esc_attr_e('点赞', 'aksrt'); ?>">
|
||||
<span class="muted-2-color ml6" title="<?php esc_attr_e('点赞', 'jio'); ?>">
|
||||
<i class="fa fas fa-thumbs-up" aria-hidden="true"></i><?php echo esc_html((string) $likes); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
@@ -96,7 +96,7 @@ $header_style = (string) get_post_meta(get_queried_object_id(), 'page_header_sty
|
||||
echo '</ul></div>';
|
||||
}
|
||||
if (empty($myposts)) {
|
||||
echo '<p class="muted-2-color text-center">' . esc_html__('暂无文章', 'aksrt') . '</p>';
|
||||
echo '<p class="muted-2-color text-center">' . esc_html__('暂无文章', 'jio') . '</p>';
|
||||
}
|
||||
?>
|
||||
</article>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - Categories
|
||||
* Template Name: Jio - Categories
|
||||
* Template Post Type: page
|
||||
*
|
||||
* 分类汇总页面:列出全站所有分类。
|
||||
*
|
||||
* 用法:在后台新建一个 Page,标题任意(默认显示页面标题,否则用"分类目录"),
|
||||
* 模板选择 "AKSRT - Categories";或将 slug 设为 "categories" 自动匹配。
|
||||
* 模板选择 "Jio - Categories";或将 slug 设为 "categories" 自动匹配。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -42,13 +42,13 @@ $total_posts = $total_counts && isset($total_counts->publish) ? (int) $total_co
|
||||
|
||||
$page_title = trim((string) get_the_title());
|
||||
if ($page_title === '') {
|
||||
$page_title = __('分类目录', 'aksrt');
|
||||
$page_title = __('分类目录', 'jio');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (function_exists('aksrt_archive_open_shell')) {
|
||||
aksrt_archive_open_shell([
|
||||
if (function_exists('jio_archive_open_shell')) {
|
||||
jio_archive_open_shell([
|
||||
'main_class' => 'site-main container ',
|
||||
'has_sidebar' => false,
|
||||
'page_kind' => 'categories',
|
||||
@@ -56,11 +56,11 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
}
|
||||
?>
|
||||
<div class="content-main content-main--page content-main--categories">
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
<?php if (function_exists('jio_breadcrumbs')) { jio_breadcrumbs(); } ?>
|
||||
<?php
|
||||
$cats_meta = sprintf(
|
||||
/* translators: 1: total category count, 2: total published post count */
|
||||
esc_html__('共 %1$d 个分类 · 共 %2$d 篇文章', 'aksrt'),
|
||||
esc_html__('共 %1$d 个分类 · 共 %2$d 篇文章', 'jio'),
|
||||
$total_cats,
|
||||
$total_posts
|
||||
);
|
||||
@@ -71,44 +71,44 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
?>
|
||||
|
||||
<?php if (!empty($top_level)) : ?>
|
||||
<section class="aksrt-cats-grid" aria-label="<?php esc_attr_e('分类列表', 'aksrt'); ?>">
|
||||
<section class="jio-cats-grid" aria-label="<?php esc_attr_e('分类列表', 'jio'); ?>">
|
||||
<?php foreach ($top_level as $cat) :
|
||||
$cat_id = (int) $cat->term_id;
|
||||
$cat_link = get_category_link($cat_id);
|
||||
$cover_url = class_exists('\AKSRT\Settings\Settings')
|
||||
? \AKSRT\Settings\Settings::get_category_cover_url($cat_id)
|
||||
$cover_url = class_exists('\Jio\Settings\Settings')
|
||||
? \Jio\Settings\Settings::get_category_cover_url($cat_id)
|
||||
: (get_template_directory_uri() . '/assets/img/placeholder.svg');
|
||||
$desc = class_exists('\AKSRT\Settings\Settings')
|
||||
? \AKSRT\Settings\Settings::get_category_recommend_desc($cat_id)
|
||||
$desc = class_exists('\Jio\Settings\Settings')
|
||||
? \Jio\Settings\Settings::get_category_recommend_desc($cat_id)
|
||||
: (string) $cat->description;
|
||||
$children = $children_by_parent[$cat_id] ?? [];
|
||||
?>
|
||||
<article class="aksrt-cat-card">
|
||||
<a class="aksrt-cat-card__cover"
|
||||
<article class="jio-cat-card">
|
||||
<a class="jio-cat-card__cover"
|
||||
href="<?php echo esc_url($cat_link); ?>"
|
||||
style="background-image: url('<?php echo esc_url($cover_url); ?>');"
|
||||
aria-label="<?php echo esc_attr($cat->name); ?>">
|
||||
<span class="aksrt-cat-card__count-badge">
|
||||
<?php printf(esc_html__('%d 篇', 'aksrt'), (int) $cat->count); ?>
|
||||
<span class="jio-cat-card__count-badge">
|
||||
<?php printf(esc_html__('%d 篇', 'jio'), (int) $cat->count); ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<div class="aksrt-cat-card__body">
|
||||
<h2 class="aksrt-cat-card__title">
|
||||
<div class="jio-cat-card__body">
|
||||
<h2 class="jio-cat-card__title">
|
||||
<a href="<?php echo esc_url($cat_link); ?>"><?php echo esc_html($cat->name); ?></a>
|
||||
</h2>
|
||||
|
||||
<?php if ($desc !== '') : ?>
|
||||
<p class="aksrt-cat-card__desc"><?php echo esc_html(wp_trim_words(wp_strip_all_tags($desc), 40, '…')); ?></p>
|
||||
<p class="jio-cat-card__desc"><?php echo esc_html(wp_trim_words(wp_strip_all_tags($desc), 40, '…')); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($children)) : ?>
|
||||
<ul class="aksrt-cat-card__children" aria-label="<?php esc_attr_e('子分类', 'aksrt'); ?>">
|
||||
<ul class="jio-cat-card__children" aria-label="<?php esc_attr_e('子分类', 'jio'); ?>">
|
||||
<?php foreach ($children as $child) : ?>
|
||||
<li>
|
||||
<a href="<?php echo esc_url(get_category_link((int) $child->term_id)); ?>">
|
||||
<span class="aksrt-cat-card__child-name"><?php echo esc_html($child->name); ?></span>
|
||||
<span class="aksrt-cat-card__child-count"><?php echo (int) $child->count; ?></span>
|
||||
<span class="jio-cat-card__child-name"><?php echo esc_html($child->name); ?></span>
|
||||
<span class="jio-cat-card__child-count"><?php echo (int) $child->count; ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
@@ -119,21 +119,21 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
<?php endforeach; ?>
|
||||
</section>
|
||||
<?php else : ?>
|
||||
<div class="no-results aksrt-cats-empty">
|
||||
<p><?php esc_html_e('暂无分类。', 'aksrt'); ?></p>
|
||||
<div class="no-results jio-cats-empty">
|
||||
<p><?php esc_html_e('暂无分类。', 'jio'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="aksrt-cats-footer">
|
||||
<p class="jio-cats-footer">
|
||||
<a class="btn-outline" href="<?php echo esc_url(home_url('/')); ?>">
|
||||
<?php esc_html_e('返回首页', 'aksrt'); ?>
|
||||
<?php esc_html_e('返回首页', 'jio'); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if (function_exists('aksrt_archive_close_shell')) {
|
||||
aksrt_archive_close_shell(['has_sidebar' => false]);
|
||||
if (function_exists('jio_archive_close_shell')) {
|
||||
jio_archive_close_shell(['has_sidebar' => false]);
|
||||
}
|
||||
|
||||
get_footer();
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - 单篇资源下载
|
||||
* Template Name: Jio - 单篇资源下载
|
||||
* Template Post Type: page
|
||||
*
|
||||
* legacy pages/download.php equivalent.
|
||||
@@ -8,7 +8,7 @@
|
||||
* Only for pay_type=download posts. Shows download buttons when allowed,
|
||||
* or a no-permission state with a back link to the article.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -19,21 +19,21 @@ $post = $post_id > 0 ? get_post($post_id) : null;
|
||||
if (!$post instanceof WP_Post || $post->post_status !== 'publish') {
|
||||
get_header();
|
||||
echo '<main class="container"><div class="content-wrap"><div class="content-layout">';
|
||||
echo '<div class="alert jb-red em12" style="margin:2em;"><b>' . esc_html__('无效的下载请求', 'aksrt') . '</b></div>';
|
||||
echo '<div class="alert jb-red em12" style="margin:2em;"><b>' . esc_html__('无效的下载请求', 'jio') . '</b></div>';
|
||||
echo '</div></div></main>';
|
||||
get_footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
$pay_meta = function_exists('aksrt_get_pay_meta') ? aksrt_get_pay_meta($post) : ['pay_type' => 'no', 'downloads' => []];
|
||||
$pay_meta = function_exists('jio_get_pay_meta') ? jio_get_pay_meta($post) : ['pay_type' => 'no', 'downloads' => []];
|
||||
$pay_type = (string) ($pay_meta['pay_type'] ?? 'no');
|
||||
$is_download = $pay_type === 'download' || (function_exists('aksrt_is_downloadable_content') && aksrt_is_downloadable_content($post));
|
||||
$is_download = $pay_type === 'download' || (function_exists('jio_is_downloadable_content') && jio_is_downloadable_content($post));
|
||||
|
||||
if (!$is_download) {
|
||||
get_header();
|
||||
echo '<main class="container"><div class="content-wrap"><div class="content-layout">';
|
||||
echo '<div class="alert jb-red em12" style="margin:2em;"><b>' . esc_html__('该内容不是可下载资源', 'aksrt') . '</b></div>';
|
||||
echo '<p><a class="but jb-yellow padding-lg" href="' . esc_url(get_permalink($post)) . '#posts-pay"><i class="fa fas fa-long-arrow-alt-left" aria-hidden="true"></i><span class="ml10">' . esc_html__('返回文章', 'aksrt') . '</span></a></p>';
|
||||
echo '<div class="alert jb-red em12" style="margin:2em;"><b>' . esc_html__('该内容不是可下载资源', 'jio') . '</b></div>';
|
||||
echo '<p><a class="but jb-yellow padding-lg" href="' . esc_url(get_permalink($post)) . '#posts-pay"><i class="fa fas fa-long-arrow-alt-left" aria-hidden="true"></i><span class="ml10">' . esc_html__('返回文章', 'jio') . '</span></a></p>';
|
||||
echo '</div></div></main>';
|
||||
get_footer();
|
||||
exit;
|
||||
@@ -47,54 +47,54 @@ $pay_details = trim((string) ($pay_meta['pay_details'] ?? ''));
|
||||
$pay_extra_hide = trim((string) ($pay_meta['pay_extra_hide'] ?? ''));
|
||||
$subtitle = '';
|
||||
if (function_exists('get_the_subtitle')) {
|
||||
// noop — AKSRT may not have legacy subtitle helper
|
||||
// noop — Jio may not have legacy subtitle helper
|
||||
}
|
||||
$has_access = function_exists('aksrt_has_paid_access') ? aksrt_has_paid_access($post) : false;
|
||||
$gate = function_exists('aksrt_can_download') ? aksrt_can_download($post) : true;
|
||||
$has_access = function_exists('jio_has_paid_access') ? jio_has_paid_access($post) : false;
|
||||
$gate = function_exists('jio_can_download') ? jio_can_download($post) : true;
|
||||
$can_dl = $gate === true;
|
||||
$gate_code = is_wp_error($gate) ? $gate->get_error_code() : '';
|
||||
$need_login = $gate_code === 'aksrt_need_login';
|
||||
$need_purchase = $gate_code === 'aksrt_need_purchase';
|
||||
$need_vip = $gate_code === 'aksrt_need_vip';
|
||||
$need_login = $gate_code === 'jio_need_login';
|
||||
$need_purchase = $gate_code === 'jio_need_purchase';
|
||||
$need_vip = $gate_code === 'jio_need_vip';
|
||||
|
||||
$priced = function_exists('aksrt_get_user_pay_price') ? aksrt_get_user_pay_price($post) : null;
|
||||
$priced = function_exists('jio_get_user_pay_price') ? jio_get_user_pay_price($post) : null;
|
||||
$price = is_array($priced) ? (float) ($priced['amount'] ?? 0) : (float) ($pay_meta['price'] ?? 0);
|
||||
$pay_modo = is_array($priced) ? ((($priced['modo'] ?? '0') === 'points') ? 'points' : '0') : ((($pay_meta['pay_modo'] ?? '0') === 'points') ? 'points' : '0');
|
||||
$currency = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_currency_name() : __('积分', 'aksrt');
|
||||
$currency = class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_currency_name() : __('积分', 'jio');
|
||||
$cash_symbol = '¥';
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$paid_display = \AKSRT\Settings\Settings::get_paid_content_settings();
|
||||
if (class_exists('\Jio\Settings\Settings')) {
|
||||
$paid_display = \Jio\Settings\Settings::get_paid_content_settings();
|
||||
$cash_symbol = (string) ($paid_display['display']['currency_symbol'] ?? '¥');
|
||||
}
|
||||
$price_text = $price <= 0
|
||||
? __('免费', 'aksrt')
|
||||
? __('免费', 'jio')
|
||||
: ($pay_modo === 'points'
|
||||
? (function_exists('aksrt_format_price') ? aksrt_format_price($price) : (string) $price) . ' ' . $currency
|
||||
: $cash_symbol . (function_exists('aksrt_format_price') ? aksrt_format_price($price) : (string) $price));
|
||||
? (function_exists('jio_format_price') ? jio_format_price($price) : (string) $price) . ' ' . $currency
|
||||
: $cash_symbol . (function_exists('jio_format_price') ? jio_format_price($price) : (string) $price));
|
||||
$login_url = wp_login_url(add_query_arg('post', $post_id, get_permalink()));
|
||||
$vip_url = function_exists('aksrt_get_user_center_url') ? aksrt_get_user_center_url() : home_url('/');
|
||||
$vip_url = function_exists('jio_get_user_center_url') ? jio_get_user_center_url() : home_url('/');
|
||||
|
||||
$paid_name = '';
|
||||
if ($has_access || $can_dl) {
|
||||
if ($price <= 0) {
|
||||
$paid_name = __('免费资源', 'aksrt');
|
||||
$paid_name = __('免费资源', 'jio');
|
||||
} else {
|
||||
$paid_name = __('已获得下载权限', 'aksrt');
|
||||
$paid_name = __('已获得下载权限', 'jio');
|
||||
}
|
||||
}
|
||||
|
||||
get_header();
|
||||
?>
|
||||
<style>
|
||||
.aksrt-single-download .but-download > .but,
|
||||
.aksrt-single-download .but-download > a,
|
||||
.aksrt-single-download .but-download > button,
|
||||
.aksrt-single-download .resource-download-box__btn {
|
||||
.jio-single-download .but-download > .but,
|
||||
.jio-single-download .but-download > a,
|
||||
.jio-single-download .but-download > button,
|
||||
.jio-single-download .resource-download-box__btn {
|
||||
min-width: 200px;
|
||||
padding: .5em;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.aksrt-single-download .pay-extra-hide {
|
||||
.jio-single-download .pay-extra-hide {
|
||||
background: var(--muted-border-color, #f0f0f0);
|
||||
display: block;
|
||||
margin: 10px 0;
|
||||
@@ -103,7 +103,7 @@ get_header();
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
<main class="container aksrt-single-download">
|
||||
<main class="container jio-single-download">
|
||||
<div class="content-wrap">
|
||||
<div class="content-layout">
|
||||
<article class="article page-article main-bg theme-box box-body radius8 main-shadow">
|
||||
@@ -133,9 +133,9 @@ get_header();
|
||||
global $post;
|
||||
$GLOBALS['post'] = $post;
|
||||
setup_postdata($post);
|
||||
$GLOBALS['aksrt_on_download_file_page'] = true;
|
||||
$GLOBALS['jio_on_download_file_page'] = true;
|
||||
get_template_part('templates/parts/resource-download-box');
|
||||
unset($GLOBALS['aksrt_on_download_file_page']);
|
||||
unset($GLOBALS['jio_on_download_file_page']);
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</div>
|
||||
@@ -144,59 +144,59 @@ get_header();
|
||||
<?php endif; ?>
|
||||
<?php elseif ($need_login) : ?>
|
||||
<div class="alert jb-yellow em12" style="margin:2em;">
|
||||
<b><?php echo ($price <= 0) ? esc_html__('免费资源,请登录后下载', 'aksrt') : esc_html__('请先登录后再下载', 'aksrt'); ?></b>
|
||||
<b><?php echo ($price <= 0) ? esc_html__('免费资源,请登录后下载', 'jio') : esc_html__('请先登录后再下载', 'jio'); ?></b>
|
||||
</div>
|
||||
<div class="pay-extra-hide">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: login url */
|
||||
wp_kses_post(__('Hi!请先 <a href="%s">登录</a> 后再下载。', 'aksrt')),
|
||||
wp_kses_post(__('Hi!请先 <a href="%s">登录</a> 后再下载。', 'jio')),
|
||||
esc_url($login_url)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<a style="margin-bottom:2em;" href="<?php echo esc_url($login_url); ?>" class="but jb-red padding-lg">
|
||||
<i class="fa fas fa-sign-in-alt" aria-hidden="true"></i>
|
||||
<span class="ml10"><?php esc_html_e('前往登录', 'aksrt'); ?></span>
|
||||
<span class="ml10"><?php esc_html_e('前往登录', 'jio'); ?></span>
|
||||
</a>
|
||||
<?php elseif ($need_vip) : ?>
|
||||
<div class="alert jb-yellow em12" style="margin:2em;">
|
||||
<b><?php echo esc_html(is_wp_error($gate) ? $gate->get_error_message() : __('该资源仅限会员购买/下载。', 'aksrt')); ?></b>
|
||||
<b><?php echo esc_html(is_wp_error($gate) ? $gate->get_error_message() : __('该资源仅限会员购买/下载。', 'jio')); ?></b>
|
||||
</div>
|
||||
<a style="margin-bottom:1em;" href="<?php echo esc_url($vip_url); ?>" class="but jb-vip padding-lg">
|
||||
<i class="fa fas fa-certificate" aria-hidden="true"></i>
|
||||
<span class="ml10"><?php esc_html_e('开通会员', 'aksrt'); ?></span>
|
||||
<span class="ml10"><?php esc_html_e('开通会员', 'jio'); ?></span>
|
||||
</a>
|
||||
<a style="margin-bottom:2em;" href="<?php echo esc_url($article_url); ?>" class="but jb-yellow padding-lg">
|
||||
<i class="fa fas fa-long-arrow-alt-left" aria-hidden="true"></i>
|
||||
<span class="ml10"><?php esc_html_e('返回文章', 'aksrt'); ?></span>
|
||||
<span class="ml10"><?php esc_html_e('返回文章', 'jio'); ?></span>
|
||||
</a>
|
||||
<?php elseif ($need_purchase) : ?>
|
||||
<div class="alert jb-red em12" style="margin:2em;">
|
||||
<b><?php esc_html_e('请先购买后再下载', 'aksrt'); ?></b>
|
||||
<b><?php esc_html_e('请先购买后再下载', 'jio'); ?></b>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="but <?php echo $pay_modo === 'points' ? 'jb-yellow' : 'jb-red'; ?> padding-lg cashier-link"
|
||||
data-action="aksrt-need-purchase"
|
||||
data-aksrt-pay-content="<?php echo esc_attr((string) $post_id); ?>"
|
||||
data-action="jio-need-purchase"
|
||||
data-jio-pay-content="<?php echo esc_attr((string) $post_id); ?>"
|
||||
data-post-id="<?php echo esc_attr((string) $post_id); ?>"
|
||||
style="margin-bottom:1em;"
|
||||
>
|
||||
<i class="fa fas fa-shopping-cart" aria-hidden="true"></i>
|
||||
<span class="ml10"><?php printf(esc_html__('立即购买(%s)', 'aksrt'), $price_text); ?></span>
|
||||
<span class="ml10"><?php printf(esc_html__('立即购买(%s)', 'jio'), $price_text); ?></span>
|
||||
</button>
|
||||
<a style="margin-bottom:2em;" href="<?php echo esc_url($article_url); ?>" class="but jb-yellow padding-lg">
|
||||
<i class="fa fas fa-long-arrow-alt-left" aria-hidden="true"></i>
|
||||
<span class="ml10"><?php esc_html_e('返回文章', 'aksrt'); ?></span>
|
||||
<span class="ml10"><?php esc_html_e('返回文章', 'jio'); ?></span>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<div class="alert jb-red em12" style="margin:2em;">
|
||||
<b><?php echo esc_html(is_wp_error($gate) ? $gate->get_error_message() : __('暂无下载权限', 'aksrt')); ?></b>
|
||||
<b><?php echo esc_html(is_wp_error($gate) ? $gate->get_error_message() : __('暂无下载权限', 'jio')); ?></b>
|
||||
</div>
|
||||
<a style="margin-bottom:2em;" href="<?php echo esc_url($article_url); ?>" class="but jb-yellow padding-lg">
|
||||
<i class="fa fas fa-long-arrow-alt-left" aria-hidden="true"></i>
|
||||
<span class="ml10"><?php esc_html_e('返回文章', 'aksrt'); ?></span>
|
||||
<span class="ml10"><?php esc_html_e('返回文章', 'jio'); ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - Download Center
|
||||
* Template Name: Jio - Download Center
|
||||
* Template Post Type: page
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -14,8 +14,8 @@ $paged = max(1, (int) get_query_var('paged'));
|
||||
$per_page = 12;
|
||||
|
||||
$type_filter = isset($_GET['resource_type']) ? sanitize_key((string) $_GET['resource_type']) : '';
|
||||
$resource_type_labels = function_exists('aksrt_get_pay_types') ? aksrt_get_pay_types() : [];
|
||||
unset($resource_type_labels[\AKSRT\Core\DomainModel::PAY_TYPE_READING]);
|
||||
$resource_type_labels = function_exists('jio_get_pay_types') ? jio_get_pay_types() : [];
|
||||
unset($resource_type_labels[\Jio\Core\DomainModel::PAY_TYPE_READING]);
|
||||
|
||||
if ($type_filter !== '' && !isset($resource_type_labels[$type_filter])) {
|
||||
$type_filter = '';
|
||||
@@ -31,8 +31,8 @@ $query_args = [
|
||||
'ignore_sticky_posts' => true,
|
||||
'meta_query' => [
|
||||
[
|
||||
'key' => \AKSRT\Core\DomainModel::PAY_TYPE_KEY,
|
||||
'value' => \AKSRT\Core\DomainModel::PAY_TYPE_DOWNLOAD,
|
||||
'key' => \Jio\Core\DomainModel::PAY_TYPE_KEY,
|
||||
'value' => \Jio\Core\DomainModel::PAY_TYPE_DOWNLOAD,
|
||||
'compare' => '=',
|
||||
],
|
||||
],
|
||||
@@ -40,7 +40,7 @@ $query_args = [
|
||||
|
||||
if ($type_filter !== '') {
|
||||
$query_args['meta_query'][] = [
|
||||
'key' => \AKSRT\Core\DomainModel::PAY_TYPE_KEY,
|
||||
'key' => \Jio\Core\DomainModel::PAY_TYPE_KEY,
|
||||
'value' => $type_filter,
|
||||
];
|
||||
}
|
||||
@@ -52,111 +52,111 @@ $user_credits = 0;
|
||||
$user_download_count = 0;
|
||||
if ($is_logged_in) {
|
||||
$uid = get_current_user_id();
|
||||
$user_credits = \AKSRT\Ledger\LedgerService::get_instance()->balance($uid, \AKSRT\Ledger\AssetType::POINTS);
|
||||
$dl_meta = get_user_meta($uid, '_aksrt_downloaded_resources', true);
|
||||
$user_credits = \Jio\Ledger\LedgerService::get_instance()->balance($uid, \Jio\Ledger\AssetType::POINTS);
|
||||
$dl_meta = get_user_meta($uid, '_jio_downloaded_resources', true);
|
||||
$user_download_count = is_array($dl_meta) ? count($dl_meta) : 0;
|
||||
}
|
||||
|
||||
$currency_name = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_currency_name() : __('积分', 'aksrt');
|
||||
$dl_requires_login = function_exists('aksrt_user_can') && !aksrt_user_can('resource_download', get_current_user_id());
|
||||
$currency_name = class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_currency_name() : __('积分', 'jio');
|
||||
$dl_requires_login = function_exists('jio_user_can') && !jio_user_can('resource_download', get_current_user_id());
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main container" tabindex="-1">
|
||||
|
||||
<?php get_template_part('templates/parts/download/download-hero'); ?>
|
||||
|
||||
<div class="aksrt-download-center container">
|
||||
<div class="jio-download-center container">
|
||||
<div class="content-wrap">
|
||||
<div class="content-layout">
|
||||
<div class="content-layout__primary">
|
||||
<div class="aksrt-dl-status-bar">
|
||||
<div class="jio-dl-status-bar">
|
||||
<?php if ($is_logged_in) : ?>
|
||||
<div class="aksrt-dl-status-bar__item">
|
||||
<div class="jio-dl-status-bar__item">
|
||||
<i class="fa fas fa-money-bill" aria-hidden="true"></i>
|
||||
<span class="aksrt-dl-status-bar__label"><?php echo esc_html($currency_name); ?></span>
|
||||
<span class="aksrt-dl-status-bar__value"><?php echo esc_html(number_format_i18n($user_credits)); ?></span>
|
||||
<span class="jio-dl-status-bar__label"><?php echo esc_html($currency_name); ?></span>
|
||||
<span class="jio-dl-status-bar__value"><?php echo esc_html(number_format_i18n($user_credits)); ?></span>
|
||||
</div>
|
||||
<div class="aksrt-dl-status-bar__item">
|
||||
<div class="jio-dl-status-bar__item">
|
||||
<i class="fa fas fa-download" aria-hidden="true"></i>
|
||||
<span class="aksrt-dl-status-bar__label"><?php esc_html_e('已下载', 'aksrt'); ?></span>
|
||||
<span class="aksrt-dl-status-bar__value"><?php echo esc_html(number_format_i18n($user_download_count)); ?></span>
|
||||
<span class="jio-dl-status-bar__label"><?php esc_html_e('已下载', 'jio'); ?></span>
|
||||
<span class="jio-dl-status-bar__value"><?php echo esc_html(number_format_i18n($user_download_count)); ?></span>
|
||||
</div>
|
||||
<div class="aksrt-dl-status-bar__item aksrt-dl-status-bar__item--hint">
|
||||
<div class="jio-dl-status-bar__item jio-dl-status-bar__item--hint">
|
||||
<i class="fa fas fa-info-circle" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e('下载能力已归入统一内容付费模型,可从文章内容页直接解锁和下载。', 'aksrt'); ?></span>
|
||||
<span><?php esc_html_e('下载能力已归入统一内容付费模型,可从文章内容页直接解锁和下载。', 'jio'); ?></span>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="aksrt-dl-status-bar__item aksrt-dl-status-bar__item--hint">
|
||||
<div class="jio-dl-status-bar__item jio-dl-status-bar__item--hint">
|
||||
<i class="fa fas fa-lock" aria-hidden="true"></i>
|
||||
<span>
|
||||
<?php if ($dl_requires_login) : ?>
|
||||
<?php esc_html_e('登录后可查看下载状态、积分余额并解锁可下载内容', 'aksrt'); ?>
|
||||
<?php esc_html_e('登录后可查看下载状态、积分余额并解锁可下载内容', 'jio'); ?>
|
||||
<?php else : ?>
|
||||
<?php esc_html_e('登录后可查看下载状态和积分余额,并解锁可下载内容', 'aksrt'); ?>
|
||||
<?php esc_html_e('登录后可查看下载状态和积分余额,并解锁可下载内容', 'jio'); ?>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="aksrt-dl-status-bar__actions">
|
||||
<a href="<?php echo esc_url(aksrt_get_login_url()); ?>" class="btn-outline btn-sm"><?php esc_html_e('登录', 'aksrt'); ?></a>
|
||||
<div class="jio-dl-status-bar__actions">
|
||||
<a href="<?php echo esc_url(jio_get_login_url()); ?>" class="btn-outline btn-sm"><?php esc_html_e('登录', 'jio'); ?></a>
|
||||
<?php if (get_option('users_can_register')) : ?>
|
||||
<a href="<?php echo esc_url(aksrt_get_register_url()); ?>" class="btn-primary btn-sm"><?php esc_html_e('注册', 'aksrt'); ?></a>
|
||||
<a href="<?php echo esc_url(jio_get_register_url()); ?>" class="btn-primary btn-sm"><?php esc_html_e('注册', 'jio'); ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="aksrt-download-center__layout">
|
||||
<div class="aksrt-download-center__main">
|
||||
<div class="theme-box box-body aksrt-download-center__intro">
|
||||
<h2><?php esc_html_e('内容下载中心(兼容入口)', 'aksrt'); ?></h2>
|
||||
<p><?php esc_html_e('这里汇总所有已启用“付费下载”能力的文章,下载只是统一付费体系中的一种交付方式;普通文章内容页仍是主消费入口。', 'aksrt'); ?></p>
|
||||
<div class="jio-download-center__layout">
|
||||
<div class="jio-download-center__main">
|
||||
<div class="theme-box box-body jio-download-center__intro">
|
||||
<h2><?php esc_html_e('内容下载中心(兼容入口)', 'jio'); ?></h2>
|
||||
<p><?php esc_html_e('这里汇总所有已启用“付费下载”能力的文章,下载只是统一付费体系中的一种交付方式;普通文章内容页仍是主消费入口。', 'jio'); ?></p>
|
||||
</div>
|
||||
<?php if ($resource_query->have_posts()) : ?>
|
||||
<div class="aksrt-download-center__grid">
|
||||
<div class="jio-download-center__grid">
|
||||
<?php while ($resource_query->have_posts()) : $resource_query->the_post(); ?>
|
||||
<article class="aksrt-download-card<?php echo function_exists('aksrt_is_resource_post') && aksrt_is_resource_post(get_the_ID()) ? ' is-resource' : ''; ?>">
|
||||
<article class="jio-download-card<?php echo function_exists('jio_is_resource_post') && jio_is_resource_post(get_the_ID()) ? ' is-resource' : ''; ?>">
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<div class="aksrt-download-card__thumb">
|
||||
<div class="jio-download-card__thumb">
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_post_thumbnail('medium'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="aksrt-download-card__body">
|
||||
<p class="aksrt-download-card__eyebrow">
|
||||
<?php echo esc_html(function_exists('aksrt_is_resource_post') && aksrt_is_resource_post(get_the_ID()) ? __('资源内容入口', 'aksrt') : __('内容付费入口', 'aksrt')); ?>
|
||||
<div class="jio-download-card__body">
|
||||
<p class="jio-download-card__eyebrow">
|
||||
<?php echo esc_html(function_exists('jio_is_resource_post') && jio_is_resource_post(get_the_ID()) ? __('资源内容入口', 'jio') : __('内容付费入口', 'jio')); ?>
|
||||
</p>
|
||||
<h3 class="aksrt-download-card__title">
|
||||
<h3 class="jio-download-card__title">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
||||
</h3>
|
||||
<p class="aksrt-download-card__excerpt"><?php echo esc_html(wp_trim_words(get_the_excerpt(), 20)); ?></p>
|
||||
<div class="aksrt-download-card__meta">
|
||||
<span class="aksrt-download-card__date">
|
||||
<p class="jio-download-card__excerpt"><?php echo esc_html(wp_trim_words(get_the_excerpt(), 20)); ?></p>
|
||||
<div class="jio-download-card__meta">
|
||||
<span class="jio-download-card__date">
|
||||
<i class="fa far fa-clock" aria-hidden="true"></i>
|
||||
<?php echo esc_html(get_the_date()); ?>
|
||||
</span>
|
||||
<?php
|
||||
$dl_count = (int) get_post_meta(get_the_ID(), \AKSRT\Core\DomainModel::RESOURCE_DOWNLOAD_COUNT_KEY, true);
|
||||
$dl_count = (int) get_post_meta(get_the_ID(), \Jio\Core\DomainModel::RESOURCE_DOWNLOAD_COUNT_KEY, true);
|
||||
if ($dl_count > 0) :
|
||||
?>
|
||||
<span class="aksrt-download-card__downloads">
|
||||
<span class="jio-download-card__downloads">
|
||||
<i class="fa fas fa-download"></i>
|
||||
<?php echo esc_html(number_format_i18n($dl_count)); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
$card_meta = function_exists('aksrt_get_download_box_meta') ? aksrt_get_download_box_meta(get_the_ID()) : [];
|
||||
$price_label = function_exists('aksrt_get_pay_price_label')
|
||||
? aksrt_get_pay_price_label(get_the_ID())
|
||||
: ['text' => __('免费', 'aksrt'), 'free' => true];
|
||||
$card_meta = function_exists('jio_get_download_box_meta') ? jio_get_download_box_meta(get_the_ID()) : [];
|
||||
$price_label = function_exists('jio_get_pay_price_label')
|
||||
? jio_get_pay_price_label(get_the_ID())
|
||||
: ['text' => __('免费', 'jio'), 'free' => true];
|
||||
?>
|
||||
<div class="aksrt-download-card__footer">
|
||||
<span class="aksrt-download-card__price<?php echo !empty($price_label['free']) ? ' is-free' : ' is-paid'; ?>">
|
||||
<div class="jio-download-card__footer">
|
||||
<span class="jio-download-card__price<?php echo !empty($price_label['free']) ? ' is-free' : ' is-paid'; ?>">
|
||||
<?php echo esc_html((string) ($price_label['text'] ?? '')); ?>
|
||||
</span>
|
||||
<a href="<?php the_permalink(); ?>" class="aksrt-download-card__action">
|
||||
<?php esc_html_e('进入内容页', 'aksrt'); ?>
|
||||
<a href="<?php the_permalink(); ?>" class="jio-download-card__action">
|
||||
<?php esc_html_e('进入内容页', 'jio'); ?>
|
||||
<i class="fa fas fa-arrow-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -165,32 +165,32 @@ $dl_requires_login = function_exists('aksrt_user_can') && !aksrt_user_can('resou
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<?php
|
||||
if (function_exists('aksrt_render_pagination')) {
|
||||
aksrt_render_pagination($resource_query);
|
||||
if (function_exists('jio_render_pagination')) {
|
||||
jio_render_pagination($resource_query);
|
||||
}
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
<?php else : ?>
|
||||
<div class="aksrt-download-center__empty">
|
||||
<div class="jio-download-center__empty">
|
||||
<i class="fa fas fa-folder-open"></i>
|
||||
<p><?php esc_html_e('暂无启用下载能力的内容。', 'aksrt'); ?></p>
|
||||
<p><?php esc_html_e('暂无启用下载能力的内容。', 'jio'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<aside class="aksrt-download-center__sidebar sidebar">
|
||||
<aside class="jio-download-center__sidebar sidebar">
|
||||
<?php get_template_part('templates/parts/download/download-permission-card'); ?>
|
||||
|
||||
<div class="aksrt-dl-sidebar-card">
|
||||
<h3 class="aksrt-dl-sidebar-card__title">
|
||||
<div class="jio-dl-sidebar-card">
|
||||
<h3 class="jio-dl-sidebar-card__title">
|
||||
<i class="fa fas fa-folder"></i>
|
||||
<?php esc_html_e('下载类型', 'aksrt'); ?>
|
||||
<?php esc_html_e('下载类型', 'jio'); ?>
|
||||
</h3>
|
||||
<?php if (!empty($resource_type_labels)) : ?>
|
||||
<ul class="aksrt-dl-sidebar-card__list">
|
||||
<ul class="jio-dl-sidebar-card__list">
|
||||
<li class="<?php echo $type_filter === '' ? 'is-active' : ''; ?>">
|
||||
<a href="<?php echo esc_url(get_permalink()); ?>">
|
||||
<?php esc_html_e('全部可下载内容', 'aksrt'); ?>
|
||||
<?php esc_html_e('全部可下载内容', 'jio'); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php foreach ($resource_type_labels as $type_key => $type_label) : ?>
|
||||
@@ -204,15 +204,15 @@ $dl_requires_login = function_exists('aksrt_user_can') && !aksrt_user_can('resou
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="aksrt-dl-sidebar-card">
|
||||
<h3 class="aksrt-dl-sidebar-card__title">
|
||||
<div class="jio-dl-sidebar-card">
|
||||
<h3 class="jio-dl-sidebar-card__title">
|
||||
<i class="fa fas fa-lightbulb"></i>
|
||||
<?php esc_html_e('下载须知', 'aksrt'); ?>
|
||||
<?php esc_html_e('下载须知', 'jio'); ?>
|
||||
</h3>
|
||||
<div class="aksrt-dl-sidebar-card__tips">
|
||||
<p><i class="fa fas fa-book" aria-hidden="true"></i> <?php esc_html_e('优先从普通文章内容页进入主付费链路', 'aksrt'); ?></p>
|
||||
<p><i class="fa fas fa-clock" aria-hidden="true"></i> <?php esc_html_e('下载链接 10 分钟内有效', 'aksrt'); ?></p>
|
||||
<p><i class="fa fas fa-sync-alt" aria-hidden="true"></i> <?php esc_html_e('下载中心作为统一内容付费的补充入口', 'aksrt'); ?></p>
|
||||
<div class="jio-dl-sidebar-card__tips">
|
||||
<p><i class="fa fas fa-book" aria-hidden="true"></i> <?php esc_html_e('优先从普通文章内容页进入主付费链路', 'jio'); ?></p>
|
||||
<p><i class="fa fas fa-clock" aria-hidden="true"></i> <?php esc_html_e('下载链接 10 分钟内有效', 'jio'); ?></p>
|
||||
<p><i class="fa fas fa-sync-alt" aria-hidden="true"></i> <?php esc_html_e('下载中心作为统一内容付费的补充入口', 'jio'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
* Template Name: 友情链接
|
||||
* Template Post Type: page
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
get_header();
|
||||
|
||||
$links = function_exists('aksrt_get_friend_links') ? aksrt_get_friend_links() : [];
|
||||
$links = function_exists('jio_get_friend_links') ? jio_get_friend_links() : [];
|
||||
|
||||
if (function_exists('aksrt_archive_open_shell')) {
|
||||
aksrt_archive_open_shell([
|
||||
if (function_exists('jio_archive_open_shell')) {
|
||||
jio_archive_open_shell([
|
||||
'main_class' => 'site-main container page-content-default',
|
||||
'has_sidebar' => false,
|
||||
'page_kind' => 'friends',
|
||||
@@ -23,8 +23,8 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
<div class="content-main content-main--page content-main--friends">
|
||||
<?php
|
||||
get_template_part('templates/parts/page-header', null, [
|
||||
'title' => esc_html__('友情链接', 'aksrt'),
|
||||
'desc' => __('与这些优秀的站点交换友链', 'aksrt'),
|
||||
'title' => esc_html__('友情链接', 'jio'),
|
||||
'desc' => __('与这些优秀的站点交换友链', 'jio'),
|
||||
]);
|
||||
?>
|
||||
|
||||
@@ -50,17 +50,17 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="no-results content-stream__empty">
|
||||
<p><?php esc_html_e('暂无友链,请在主题后台添加。', 'aksrt'); ?></p>
|
||||
<p><?php esc_html_e('暂无友链,请在主题后台添加。', 'jio'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="text-center" style="margin-top:32px;">
|
||||
<a class="btn-outline" href="<?php echo esc_url(home_url('/')); ?>"><?php esc_html_e('返回首页', 'aksrt'); ?></a>
|
||||
<a class="btn-outline" href="<?php echo esc_url(home_url('/')); ?>"><?php esc_html_e('返回首页', 'jio'); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
if (function_exists('aksrt_archive_close_shell')) {
|
||||
aksrt_archive_close_shell(['has_sidebar' => false]);
|
||||
if (function_exists('jio_archive_close_shell')) {
|
||||
jio_archive_close_shell(['has_sidebar' => false]);
|
||||
}
|
||||
|
||||
get_footer();
|
||||
@@ -2,53 +2,53 @@
|
||||
/**
|
||||
* Routed message center shell.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!is_user_logged_in()) {
|
||||
wp_safe_redirect(function_exists('aksrt_get_login_url') ? aksrt_get_login_url() : wp_login_url(aksrt_get_messages_page_url()));
|
||||
wp_safe_redirect(function_exists('jio_get_login_url') ? jio_get_login_url() : wp_login_url(jio_get_messages_page_url()));
|
||||
exit;
|
||||
}
|
||||
|
||||
get_header();
|
||||
\AKSRT\WidgetSystem\WidgetAreas::render('msg_top_fluid', 'fluid-widget-wrap');
|
||||
\Jio\WidgetSystem\WidgetAreas::render('msg_top_fluid', 'fluid-widget-wrap');
|
||||
|
||||
$messages_enabled = !class_exists('\AKSRT\Settings\Settings') || \AKSRT\Settings\Settings::message_enabled();
|
||||
$messages_enabled = !class_exists('\Jio\Settings\Settings') || \Jio\Settings\Settings::message_enabled();
|
||||
$user_id = get_current_user_id();
|
||||
$current_view = aksrt_normalize_message_view((string) get_query_var('aksrt_message_view'));
|
||||
$paginate_type = aksrt_get_message_center_paginate_type();
|
||||
$current_view = jio_normalize_message_view((string) get_query_var('jio_message_view'));
|
||||
$paginate_type = jio_get_message_center_paginate_type();
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
<?php if (function_exists('jio_breadcrumbs')) { jio_breadcrumbs(); } ?>
|
||||
<div class="container">
|
||||
<header class="messages-center__header">
|
||||
<h1 class="messages-center__title"><?php esc_html_e('消息中心', 'aksrt'); ?></h1>
|
||||
<p class="messages-center__subtitle"><?php esc_html_e('查看站内通知与互动提醒', 'aksrt'); ?></p>
|
||||
<h1 class="messages-center__title"><?php esc_html_e('消息中心', 'jio'); ?></h1>
|
||||
<p class="messages-center__subtitle"><?php esc_html_e('查看站内通知与互动提醒', 'jio'); ?></p>
|
||||
</header>
|
||||
|
||||
<?php if (!$messages_enabled) : ?>
|
||||
<div class="messages-center messages-center--disabled">
|
||||
<div class="messages-empty">
|
||||
<span class="messages-empty__icon"><i class="fa fas fa-bell-slash"></i></span>
|
||||
<p class="messages-empty__text"><?php esc_html_e('站内消息功能未开启', 'aksrt'); ?></p>
|
||||
<p class="messages-empty__hint"><?php esc_html_e('请联系管理员在后台「用户 → 消息通知」中启用。', 'aksrt'); ?></p>
|
||||
<p class="messages-empty__text"><?php esc_html_e('站内消息功能未开启', 'jio'); ?></p>
|
||||
<p class="messages-empty__hint"><?php esc_html_e('请联系管理员在后台「用户 → 消息通知」中启用。', 'jio'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="messages-center" data-message-center data-view="<?php echo esc_attr($current_view); ?>" data-paginate-type="<?php echo esc_attr($paginate_type); ?>">
|
||||
<aside class="messages-center__nav" aria-label="<?php esc_attr_e('消息分类', 'aksrt'); ?>" data-message-nav>
|
||||
<?php aksrt_render_message_center_nav($current_view, aksrt_get_message_center_counts($user_id)); ?>
|
||||
<aside class="messages-center__nav" aria-label="<?php esc_attr_e('消息分类', 'jio'); ?>" data-message-nav>
|
||||
<?php jio_render_message_center_nav($current_view, jio_get_message_center_counts($user_id)); ?>
|
||||
</aside>
|
||||
<section class="messages-center__content" data-message-content aria-live="polite" tabindex="-1">
|
||||
<?php aksrt_render_message_center_list($user_id, $current_view); ?>
|
||||
<?php jio_render_message_center_list($user_id, $current_view); ?>
|
||||
</section>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('msg_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('msg_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||||
<?php get_footer(); ?>
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - New Posts
|
||||
* Template Name: Jio - New Posts
|
||||
* Template Post Type: page
|
||||
*
|
||||
* 最新文章页:按时间倒序展示最新发布的文章。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -23,8 +23,8 @@ $query = new WP_Query([
|
||||
'order' => 'DESC',
|
||||
]);
|
||||
|
||||
if (function_exists('aksrt_archive_open_shell')) {
|
||||
aksrt_archive_open_shell([
|
||||
if (function_exists('jio_archive_open_shell')) {
|
||||
jio_archive_open_shell([
|
||||
'main_class' => 'site-main container page-content-default',
|
||||
'has_sidebar' => false,
|
||||
'page_kind' => 'newposts',
|
||||
@@ -34,35 +34,35 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
<div class="content-main content-main--page content-main--newposts">
|
||||
<?php
|
||||
get_template_part('templates/parts/page-header', null, [
|
||||
'title' => esc_html(get_the_title() ?: __('最新文章', 'aksrt')),
|
||||
'title' => esc_html(get_the_title() ?: __('最新文章', 'jio')),
|
||||
]);
|
||||
?>
|
||||
|
||||
<div class="aksrt-newposts">
|
||||
<div class="jio-newposts">
|
||||
<?php if ($query->have_posts()) : ?>
|
||||
<div class="aksrt-newposts__list">
|
||||
<div class="jio-newposts__list">
|
||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<article class="aksrt-newposts__item">
|
||||
<span class="aksrt-newposts__date"><?php echo esc_html(get_the_date()); ?></span>
|
||||
<h3 class="aksrt-newposts__title">
|
||||
<article class="jio-newposts__item">
|
||||
<span class="jio-newposts__date"><?php echo esc_html(get_the_date()); ?></span>
|
||||
<h3 class="jio-newposts__title">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
||||
</h3>
|
||||
<p class="aksrt-newposts__excerpt"><?php echo esc_html(wp_trim_words(get_the_excerpt(), 30)); ?></p>
|
||||
<p class="jio-newposts__excerpt"><?php echo esc_html(wp_trim_words(get_the_excerpt(), 30)); ?></p>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<?php
|
||||
aksrt_render_pagination($query);
|
||||
jio_render_pagination($query);
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
<?php else : ?>
|
||||
<p class="aksrt-newposts__empty content-stream__empty"><?php esc_html_e('暂无文章。', 'aksrt'); ?></p>
|
||||
<p class="jio-newposts__empty content-stream__empty"><?php esc_html_e('暂无文章。', 'jio'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if (function_exists('aksrt_archive_close_shell')) {
|
||||
aksrt_archive_close_shell(['has_sidebar' => false]);
|
||||
if (function_exists('jio_archive_close_shell')) {
|
||||
jio_archive_close_shell(['has_sidebar' => false]);
|
||||
}
|
||||
|
||||
get_footer();
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - 文章导航
|
||||
* Template Name: Jio - 文章导航
|
||||
* Template Post Type: page
|
||||
*
|
||||
* legacy pages/postsnavs.php 1:1 — selected categories with full post lists,
|
||||
* affix TOC sidebar, admin drag-sort settings modal.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -51,18 +51,18 @@ get_header();
|
||||
<?php if ($can_admin) : ?>
|
||||
<small>
|
||||
<a style="cursor:pointer" href="javascript:;" data-toggle="modal" data-target="#post-navs-sz">
|
||||
[<?php esc_html_e('设置', 'aksrt'); ?>]
|
||||
[<?php esc_html_e('设置', 'jio'); ?>]
|
||||
</a>
|
||||
</small>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
<div class="flex ab jsb hh">
|
||||
<div class="muted-color mr20">
|
||||
<?php echo esc_html($page_desc !== '' ? $page_desc : __('暂无简介内容,请设置', 'aksrt')); ?>
|
||||
<?php echo esc_html($page_desc !== '' ? $page_desc : __('暂无简介内容,请设置', 'jio')); ?>
|
||||
</div>
|
||||
<div class="pull-right page-share mt20">
|
||||
<?php if (function_exists('aksrt_render_share_buttons')) {
|
||||
aksrt_render_share_buttons(['post' => $post_id]);
|
||||
<?php if (function_exists('jio_render_share_buttons')) {
|
||||
jio_render_share_buttons(['post' => $post_id]);
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,21 +98,21 @@ get_header();
|
||||
echo '<div class="main-bg radius8 main-shadow box-body"><ul class="posts-navs__list">';
|
||||
foreach ($posts as $p) {
|
||||
$time_tip = get_the_time('Y年m月d日 H:i', $p);
|
||||
$time_ago = human_time_diff(get_the_time('U', $p), current_time('timestamp')) . __('前', 'aksrt');
|
||||
$views = function_exists('aksrt_get_post_views') ? (int) aksrt_get_post_views($p->ID) : 0;
|
||||
$time_ago = human_time_diff(get_the_time('U', $p), current_time('timestamp')) . __('前', 'jio');
|
||||
$views = function_exists('jio_get_post_views') ? (int) jio_get_post_views($p->ID) : 0;
|
||||
$likes = (int) get_post_meta($p->ID, 'like', true);
|
||||
if ($likes <= 0) {
|
||||
$likes = (int) get_post_meta($p->ID, 'aksrt_like', true);
|
||||
$likes = (int) get_post_meta($p->ID, 'jio_like', true);
|
||||
}
|
||||
$post_tip = sprintf(
|
||||
/* translators: 1: views 2: likes */
|
||||
__('阅读(%1$s) 点赞(%2$s)', 'aksrt'),
|
||||
__('阅读(%1$s) 点赞(%2$s)', 'jio'),
|
||||
(string) $views,
|
||||
(string) $likes
|
||||
);
|
||||
$subtitle = (string) get_post_meta($p->ID, 'subtitle', true);
|
||||
if ($subtitle === '') {
|
||||
$subtitle = (string) get_post_meta($p->ID, 'aksrt_subtitle', true);
|
||||
$subtitle = (string) get_post_meta($p->ID, 'jio_subtitle', true);
|
||||
}
|
||||
echo '<li class="posts-navs__item">';
|
||||
echo '<div class="text-ellipsis">';
|
||||
@@ -129,11 +129,11 @@ get_header();
|
||||
}
|
||||
} elseif ($can_admin) {
|
||||
echo '<div class="theme-box main-bg radius8 main-shadow box-body">';
|
||||
echo '<p class="muted-2-color">' . esc_html__('尚未选择分类,请点击标题旁「设置」配置要展示的分类。', 'aksrt') . '</p>';
|
||||
echo '<p class="muted-2-color">' . esc_html__('尚未选择分类,请点击标题旁「设置」配置要展示的分类。', 'jio') . '</p>';
|
||||
echo '</div>';
|
||||
} else {
|
||||
echo '<div class="theme-box main-bg radius8 main-shadow box-body">';
|
||||
echo '<p class="muted-2-color">' . esc_html__('暂无导航内容', 'aksrt') . '</p>';
|
||||
echo '<p class="muted-2-color">' . esc_html__('暂无导航内容', 'jio') . '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
@@ -141,7 +141,7 @@ get_header();
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<div class="posts-nav-box" data-affix="true" data-title="<?php esc_attr_e('导航目录', 'aksrt'); ?>"></div>
|
||||
<div class="posts-nav-box" data-affix="true" data-title="<?php esc_attr_e('导航目录', 'jio'); ?>"></div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -149,29 +149,29 @@ get_header();
|
||||
<div class="modal fade" id="post-navs-sz" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<form id="aksrt-posts-navs-settings" class="aksrt-posts-navs-settings">
|
||||
<form id="jio-posts-navs-settings" class="jio-posts-navs-settings">
|
||||
<div class="modal-header">
|
||||
<p class="modal-title">
|
||||
<?php esc_html_e('当前页面设置', 'aksrt'); ?>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>">
|
||||
<?php esc_html_e('当前页面设置', 'jio'); ?>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="<?php esc_attr_e('关闭', 'jio'); ?>">
|
||||
<i class="fa fas fa-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="navs_page_name"><?php esc_html_e('标题', 'aksrt'); ?></label>
|
||||
<input type="text" class="form-control" id="navs_page_name" name="navs_page_name" placeholder="<?php esc_attr_e('自定义标题', 'aksrt'); ?>" value="<?php echo esc_attr($page_name); ?>">
|
||||
<label for="navs_page_name"><?php esc_html_e('标题', 'jio'); ?></label>
|
||||
<input type="text" class="form-control" id="navs_page_name" name="navs_page_name" placeholder="<?php esc_attr_e('自定义标题', 'jio'); ?>" value="<?php echo esc_attr($page_name); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="navs_page_desc"><?php esc_html_e('简介', 'aksrt'); ?></label>
|
||||
<input type="text" class="form-control" id="navs_page_desc" name="navs_page_desc" placeholder="<?php esc_attr_e('自定义简介', 'aksrt'); ?>" value="<?php echo esc_attr($page_desc); ?>">
|
||||
<label for="navs_page_desc"><?php esc_html_e('简介', 'jio'); ?></label>
|
||||
<input type="text" class="form-control" id="navs_page_desc" name="navs_page_desc" placeholder="<?php esc_attr_e('自定义简介', 'jio'); ?>" value="<?php echo esc_attr($page_desc); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><?php esc_html_e('请将需要显示的分类拖动到选区并排序', 'aksrt'); ?></label>
|
||||
<label><?php esc_html_e('请将需要显示的分类拖动到选区并排序', 'jio'); ?></label>
|
||||
<div class="row text-center">
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<p class="text-muted"><?php esc_html_e('未选择的分类', 'aksrt'); ?></p>
|
||||
<p class="text-muted"><?php esc_html_e('未选择的分类', 'jio'); ?></p>
|
||||
<div class="cat-group mini-scrollbar" id="cat-sortable">
|
||||
<?php
|
||||
foreach ($all_cats as $the_cat) {
|
||||
@@ -188,7 +188,7 @@ get_header();
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6">
|
||||
<p class="text-muted"><?php esc_html_e('已选择的分类', 'aksrt'); ?></p>
|
||||
<p class="text-muted"><?php esc_html_e('已选择的分类', 'jio'); ?></p>
|
||||
<div class="cat-group mini-scrollbar" id="cat-sortable-ok">
|
||||
<?php
|
||||
foreach ($show_cat_id as $c_id) {
|
||||
@@ -208,10 +208,10 @@ get_header();
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="hidden" name="action" value="aksrt_post_navs_settings">
|
||||
<input type="hidden" name="action" value="jio_post_navs_settings">
|
||||
<input type="hidden" name="page_id" value="<?php echo (int) $post_id; ?>">
|
||||
<?php wp_nonce_field('aksrt_post_navs_settings', '_wpnonce', false); ?>
|
||||
<button type="submit" class="btn btn-primary" evt="action"><?php esc_html_e('确认修改', 'aksrt'); ?></button>
|
||||
<?php wp_nonce_field('jio_post_navs_settings', '_wpnonce', false); ?>
|
||||
<button type="submit" class="btn btn-primary" evt="action"><?php esc_html_e('确认修改', 'jio'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -6,29 +6,29 @@
|
||||
* Logged-in users manage their own account here. Public profiles are served by
|
||||
* page-user-home.php and author.php.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!is_user_logged_in()) {
|
||||
wp_safe_redirect(aksrt_get_login_url(aksrt_get_user_center_url()));
|
||||
wp_safe_redirect(jio_get_login_url(jio_get_user_center_url()));
|
||||
exit;
|
||||
}
|
||||
|
||||
$current_user = wp_get_current_user();
|
||||
|
||||
$render_context = aksrt_get_user_center_render_context($current_user);
|
||||
$render_context = jio_get_user_center_render_context($current_user);
|
||||
|
||||
get_header();
|
||||
?>
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('user_top_fluid', 'fluid-widget-wrap'); ?>
|
||||
<main id="main-content" class="site-main container content-shell content-shell--stream aksrt-profile user-center" tabindex="-1">
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('user_top_fluid', 'fluid-widget-wrap'); ?>
|
||||
<main id="main-content" class="site-main container content-shell content-shell--stream jio-profile user-center" tabindex="-1">
|
||||
<div class="content-wrap">
|
||||
<?php get_template_part('templates/parts/user-center/header', null, ['context' => $render_context]); ?>
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('user_top_content', 'aksrt-user-center__widget-zone'); ?>
|
||||
<div class="user-center-body aksrt-profile__layout">
|
||||
<aside class="user-center-sidebar uc-sidebar aksrt-profile__aside" role="complementary" aria-label="<?php esc_attr_e('用户中心导航', 'aksrt'); ?>">
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('user_top_content', 'jio-user-center__widget-zone'); ?>
|
||||
<div class="user-center-body jio-profile__layout">
|
||||
<aside class="user-center-sidebar uc-sidebar jio-profile__aside" role="complementary" aria-label="<?php esc_attr_e('用户中心导航', 'jio'); ?>">
|
||||
<?php get_template_part('templates/parts/user-center/sidebar', null, ['context' => $render_context]); ?>
|
||||
</aside>
|
||||
<div class="user-center-content uc-content">
|
||||
@@ -43,7 +43,7 @@ get_header();
|
||||
<?php get_template_part('templates/parts/user-center/runtime-config', null, ['context' => $render_context]); ?>
|
||||
</main>
|
||||
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('user_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('user_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - 登录注册
|
||||
* Template Name: Jio - 登录注册
|
||||
* Template Post Type: page
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -11,8 +11,8 @@ defined('ABSPATH') || exit;
|
||||
$allowed_tabs = ['signin', 'signup', 'resetpassword', 'bind', 'oauth'];
|
||||
$tab = isset($_GET['tab']) ? sanitize_key(wp_unslash((string) $_GET['tab'])) : 'signin';
|
||||
$tab = in_array($tab, $allowed_tabs, true) ? $tab : 'signin';
|
||||
$wechat = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_weixingzh_settings() : [];
|
||||
if (!isset($_GET['tab']) && !empty($wechat['priority']) && class_exists('\AKSRT\Auth\WeixinGzh') && \AKSRT\Auth\WeixinGzh::is_enabled()) {
|
||||
$wechat = class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_weixingzh_settings() : [];
|
||||
if (!isset($_GET['tab']) && !empty($wechat['priority']) && class_exists('\Jio\Auth\WeixinGzh') && \Jio\Auth\WeixinGzh::is_enabled()) {
|
||||
$tab = 'oauth';
|
||||
}
|
||||
$interim = isset($_REQUEST['interim-login']);
|
||||
@@ -22,23 +22,23 @@ if (is_user_logged_in() && $tab !== 'bind' && $tab !== 'oauth') {
|
||||
wp_safe_redirect($redirect_to);
|
||||
exit;
|
||||
}
|
||||
if (class_exists('\AKSRT\Settings\Settings') && \AKSRT\Settings\Settings::close_sign() && !$interim) {
|
||||
if (class_exists('\Jio\Settings\Settings') && \Jio\Settings\Settings::close_sign() && !$interim) {
|
||||
wp_safe_redirect(home_url('/'));
|
||||
exit;
|
||||
}
|
||||
if ($tab === 'signup' && class_exists('\AKSRT\Settings\Settings') && !\AKSRT\Settings\Settings::registration_enabled()) {
|
||||
if ($tab === 'signup' && class_exists('\Jio\Settings\Settings') && !\Jio\Settings\Settings::registration_enabled()) {
|
||||
$tab = 'signin';
|
||||
}
|
||||
|
||||
remove_action('wp_footer', 'aksrt_render_footer_tabbar', 20);
|
||||
remove_action('wp_footer', 'aksrt_render_float_buttons', 30);
|
||||
$ui = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::sign_page_ui() : [];
|
||||
remove_action('wp_footer', 'jio_render_footer_tabbar', 20);
|
||||
remove_action('wp_footer', 'jio_render_float_buttons', 30);
|
||||
$ui = class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::sign_page_ui() : [];
|
||||
$images = $ui['background'] ?? [];
|
||||
$background_id = $images ? (int) $images[array_rand($images)] : 0;
|
||||
$background_url = $background_id > 0 ? (string) wp_get_attachment_image_url($background_id, 'full') : '';
|
||||
$theme_mode = (string) ($ui['theme_mode'] ?? 'no');
|
||||
$position = (string) ($ui['card_position'] ?? 'right');
|
||||
$aksrt_auth_context = [
|
||||
$jio_auth_context = [
|
||||
'surface' => 'page',
|
||||
'tab' => $tab,
|
||||
'show_logo' => !empty($ui['show_logo']),
|
||||
@@ -52,13 +52,13 @@ $aksrt_auth_context = [
|
||||
<meta charset="<?php bloginfo('charset'); ?>">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<title><?php echo esc_html__('登录 / 注册', 'aksrt') . ' - ' . esc_html(get_bloginfo('name')); ?></title>
|
||||
<title><?php echo esc_html__('登录 / 注册', 'jio') . ' - ' . esc_html(get_bloginfo('name')); ?></title>
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class('page-template-user-sign ' . ($theme_mode !== 'no' ? $theme_mode : '')); ?>>
|
||||
<?php wp_body_open(); ?>
|
||||
<?php if ($background_url !== '') : ?><div class="sign-page-background" style="background-image:url('<?php echo esc_url($background_url); ?>')"></div><?php endif; ?>
|
||||
<?php if (!empty($ui['show_header']) && !$interim) : ?><header class="sign-topbar"><a href="<?php echo esc_url(home_url('/')); ?>"><?php echo esc_html(get_bloginfo('name')); ?></a><a href="<?php echo esc_url(home_url('/')); ?>"><?php esc_html_e('返回首页', 'aksrt'); ?></a></header><?php endif; ?>
|
||||
<?php if (!empty($ui['show_header']) && !$interim) : ?><header class="sign-topbar"><a href="<?php echo esc_url(home_url('/')); ?>"><?php echo esc_html(get_bloginfo('name')); ?></a><a href="<?php echo esc_url(home_url('/')); ?>"><?php esc_html_e('返回首页', 'jio'); ?></a></header><?php endif; ?>
|
||||
<main class="sign-page sign-card-position-<?php echo esc_attr($position); ?>">
|
||||
<div class="sign-page-card">
|
||||
<?php require get_template_directory() . '/templates/parts/auth-content.php'; ?>
|
||||
|
||||
+130
-130
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - 写文章/投稿
|
||||
* Template Name: Jio - 写文章/投稿
|
||||
* Template Post Type: page
|
||||
*
|
||||
* Front-end article submission page matching the reference newposts layout.
|
||||
* 注意:page-newposts.php 是「最新文章」列表,不是投稿。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -39,9 +39,9 @@ wp_enqueue_editor();
|
||||
$css = get_template_directory() . '/assets/css/frontend/pages/submit.css';
|
||||
if (file_exists($css)) {
|
||||
wp_enqueue_style(
|
||||
'aksrt-submit',
|
||||
'jio-submit',
|
||||
get_template_directory_uri() . '/assets/css/frontend/pages/submit.css',
|
||||
['aksrt-public'],
|
||||
['jio-public'],
|
||||
(string) filemtime($css)
|
||||
);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ $js = get_template_directory() . '/assets/js/front-submit.js';
|
||||
$editor_js = get_template_directory() . '/assets/js/front-submit-editor.js';
|
||||
if (file_exists($editor_js)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-front-submit-editor',
|
||||
'jio-front-submit-editor',
|
||||
get_template_directory_uri() . '/assets/js/front-submit-editor.js',
|
||||
['editor'],
|
||||
(string) filemtime($editor_js),
|
||||
@@ -59,45 +59,45 @@ if (file_exists($editor_js)) {
|
||||
$pay_download_js = get_template_directory() . '/assets/js/front-submit-pay-download.js';
|
||||
if (file_exists($pay_download_js)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-front-submit-pay-download',
|
||||
'jio-front-submit-pay-download',
|
||||
get_template_directory_uri() . '/assets/js/front-submit-pay-download.js',
|
||||
['aksrt-front-submit-editor'],
|
||||
['jio-front-submit-editor'],
|
||||
(string) filemtime($pay_download_js),
|
||||
true
|
||||
);
|
||||
}
|
||||
if (file_exists($js)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-front-submit',
|
||||
'jio-front-submit',
|
||||
get_template_directory_uri() . '/assets/js/front-submit.js',
|
||||
['loader_js', 'aksrt-front-submit-editor', 'aksrt-front-submit-pay-download'],
|
||||
['loader_js', 'jio-front-submit-editor', 'jio-front-submit-pay-download'],
|
||||
(string) filemtime($js),
|
||||
true
|
||||
);
|
||||
$upload_image_max_bytes = \AKSRT\Core\FrontSubmit::upload_limit_bytes('image');
|
||||
$upload_video_max_bytes = \AKSRT\Core\FrontSubmit::upload_limit_bytes('video');
|
||||
$upload_resource_max_bytes = \AKSRT\Core\FrontSubmit::upload_limit_bytes('resource');
|
||||
$image_upload_multiple = class_exists('\AKSRT\Attachment\UploadLimits')
|
||||
? \AKSRT\Attachment\UploadLimits::image_batch_limit()
|
||||
$upload_image_max_bytes = \Jio\Core\FrontSubmit::upload_limit_bytes('image');
|
||||
$upload_video_max_bytes = \Jio\Core\FrontSubmit::upload_limit_bytes('video');
|
||||
$upload_resource_max_bytes = \Jio\Core\FrontSubmit::upload_limit_bytes('resource');
|
||||
$image_upload_multiple = class_exists('\Jio\Attachment\UploadLimits')
|
||||
? \Jio\Attachment\UploadLimits::image_batch_limit()
|
||||
: 6;
|
||||
$system_tools = class_exists('\AKSRT\Settings\ExtensionRuntime')
|
||||
? \AKSRT\Settings\ExtensionRuntime::get_system_tools_settings()
|
||||
$system_tools = class_exists('\Jio\Settings\ExtensionRuntime')
|
||||
? \Jio\Settings\ExtensionRuntime::get_system_tools_settings()
|
||||
: [];
|
||||
$float_scenes = is_array($system_tools['mce_float_toolbar'] ?? null) ? $system_tools['mce_float_toolbar'] : ['pc_s', 'm_s'];
|
||||
$float_toolbar = wp_is_mobile() ? in_array('m_s', $float_scenes, true) : in_array('pc_s', $float_scenes, true);
|
||||
|
||||
wp_localize_script('aksrt-front-submit-editor', 'aksrtSubmitData', [
|
||||
wp_localize_script('jio-front-submit-editor', 'jioSubmitData', [
|
||||
'ajaxUrl' => admin_url('admin-ajax.php'),
|
||||
'nonce' => wp_create_nonce('aksrt_submit'),
|
||||
'restUrl' => esc_url_raw(rest_url('aksrt/v1')),
|
||||
'nonce' => wp_create_nonce('jio_submit'),
|
||||
'restUrl' => esc_url_raw(rest_url('jio/v1')),
|
||||
'restNonce' => wp_create_nonce('wp_rest'),
|
||||
'postId' => (int) ($ctx['edit_id'] ?? 0),
|
||||
|
||||
'mediaUrl' => esc_url_raw(rest_url('aksrt/v1/front-submit/media')),
|
||||
'mediaUrl' => esc_url_raw(rest_url('jio/v1/front-submit/media')),
|
||||
'media' => [
|
||||
'image' => ['url' => esc_url_raw(rest_url('aksrt/v1/front-submit/media/image'))],
|
||||
'video' => ['url' => esc_url_raw(rest_url('aksrt/v1/front-submit/media/video'))],
|
||||
'file' => ['url' => esc_url_raw(rest_url('aksrt/v1/front-submit/media/file'))],
|
||||
'image' => ['url' => esc_url_raw(rest_url('jio/v1/front-submit/media/image'))],
|
||||
'video' => ['url' => esc_url_raw(rest_url('jio/v1/front-submit/media/video'))],
|
||||
'file' => ['url' => esc_url_raw(rest_url('jio/v1/front-submit/media/file'))],
|
||||
],
|
||||
|
||||
'splitUpload' => [
|
||||
@@ -117,121 +117,121 @@ if (file_exists($js)) {
|
||||
],
|
||||
'uploads' => [
|
||||
'image' => !empty($ctx['can_upload_img']) ? [
|
||||
'url' => esc_url_raw(rest_url('aksrt/v1/front-submit/upload/image')),
|
||||
'url' => esc_url_raw(rest_url('jio/v1/front-submit/upload/image')),
|
||||
'maxSize' => $upload_image_max_bytes,
|
||||
] : null,
|
||||
'video' => !empty($ctx['can_upload_video']) ? [
|
||||
'url' => esc_url_raw(rest_url('aksrt/v1/front-submit/upload/video')),
|
||||
'url' => esc_url_raw(rest_url('jio/v1/front-submit/upload/video')),
|
||||
'maxSize' => $upload_video_max_bytes,
|
||||
] : null,
|
||||
'resource' => !empty($ctx['can_upload_file']) ? [
|
||||
'url' => esc_url_raw(rest_url('aksrt/v1/front-submit/upload/resource')),
|
||||
'url' => esc_url_raw(rest_url('jio/v1/front-submit/upload/resource')),
|
||||
'maxSize' => $upload_resource_max_bytes,
|
||||
] : null,
|
||||
],
|
||||
'i18n' => [
|
||||
'confirmLeave' => __('你有未保存的更改,确定要离开吗?', 'aksrt'),
|
||||
'saving' => __('保存中...', 'aksrt'),
|
||||
'saved' => __('草稿已保存', 'aksrt'),
|
||||
'submitting' => __('提交中...', 'aksrt'),
|
||||
'submitted' => __('投稿已提交', 'aksrt'),
|
||||
'error' => __('操作失败,请重试', 'aksrt'),
|
||||
'confirmDelete' => __('确定要删除这个草稿吗?', 'aksrt'),
|
||||
'deleting' => __('正在删除草稿…', 'aksrt'),
|
||||
'deleted' => __('草稿已删除', 'aksrt'),
|
||||
'uploading' => __('正在上传…', 'aksrt'),
|
||||
'uploaded' => __('上传成功', 'aksrt'),
|
||||
'fileTooLarge' => __('文件大小超过限制', 'aksrt'),
|
||||
'lastSaved' => __('最后保存:', 'aksrt'),
|
||||
'preview' => __('预览文章', 'aksrt'),
|
||||
'setVideoCoverTitle' => __('为视频设置封面', 'aksrt'),
|
||||
'close' => __('关闭', 'aksrt'),
|
||||
'insertImage' => __('插入图片', 'aksrt'),
|
||||
'uploadImage' => __('上传图片', 'aksrt'),
|
||||
'externalImage' => __('外链图片', 'aksrt'),
|
||||
'insertVideo' => __('插入视频', 'aksrt'),
|
||||
'uploadVideo' => __('上传视频', 'aksrt'),
|
||||
'externalVideo' => __('外链视频', 'aksrt'),
|
||||
'embedVideo' => __('嵌入视频', 'aksrt'),
|
||||
'selectVideo' => __('选择或拖入视频', 'aksrt'),
|
||||
'videoUploadHint' => __('上传完成后自动插入正文', 'aksrt'),
|
||||
'externalVideoHint' => __('请填写视频文件地址:', 'aksrt'),
|
||||
'embedVideoHint' => __('请输入嵌入地址或者直接粘贴 iframe 嵌入代码:', 'aksrt'),
|
||||
'confirmEmbed' => __('确认嵌入', 'aksrt'),
|
||||
'insertFile' => __('上传附件', 'aksrt'),
|
||||
'uploadFile' => __('上传附件', 'aksrt'),
|
||||
'externalFile' => __('输入地址', 'aksrt'),
|
||||
'selectFile' => __('选择或拖入附件', 'aksrt'),
|
||||
'fileUploadHint' => __('上传完成后自动插入正文', 'aksrt'),
|
||||
'externalFileHint' => __('请填写附件地址:', 'aksrt'),
|
||||
'selectImages' => __('选择或拖入图片', 'aksrt'),
|
||||
'imageUploadHint' => __('可批量选择,上传完成后自动插入正文', 'aksrt'),
|
||||
'selectedFiles' => __('已选择 %d 个文件', 'aksrt'),
|
||||
'confirmUpload' => __('确认上传', 'aksrt'),
|
||||
'externalImageHint' => __('每行填写一个图片地址:', 'aksrt'),
|
||||
'confirmInsert' => __('确认插入', 'aksrt'),
|
||||
'invalidMediaUrl' => __('请填写有效地址', 'aksrt'),
|
||||
'invalidVideoUrl' => __('请填写有效的视频嵌入地址', 'aksrt'),
|
||||
'invalidFile' => __('请选择有效文件', 'aksrt'),
|
||||
'uploadUnavailable' => __('当前账号不能上传此类文件', 'aksrt'),
|
||||
'mine' => __('我的媒体', 'aksrt'),
|
||||
'mineImage' => __('我的图片', 'aksrt'),
|
||||
'mineVideo' => __('我的视频', 'aksrt'),
|
||||
'mineFile' => __('我的文件', 'aksrt'),
|
||||
'search' => __('搜索', 'aksrt'),
|
||||
'searchMedia' => __('搜索媒体(至少 2 个字符)', 'aksrt'),
|
||||
'searchMin' => __('请输入至少 2 个字符进行搜索', 'aksrt'),
|
||||
'clear' => __('清除', 'aksrt'),
|
||||
'loadMore' => __('加载更多', 'aksrt'),
|
||||
'loading' => __('加载中…', 'aksrt'),
|
||||
'empty' => __('暂无媒体文件', 'aksrt'),
|
||||
'emptyMedia' => __('暂无媒体文件', 'aksrt'),
|
||||
'mediaError' => __('媒体加载失败', 'aksrt'),
|
||||
'mediaUnavailable' => __('媒体库暂不可用', 'aksrt'),
|
||||
'confirmSelected' => __('确认选择(%d)', 'aksrt'),
|
||||
'maxItems' => __('最多选择 %d 个文件', 'aksrt'),
|
||||
'maxMediaItems' => __('最多选择 %d 个文件', 'aksrt'),
|
||||
'uploadingClose' => __('上传中,请稍候再关闭', 'aksrt'),
|
||||
'mediaPickerUnavailable' => __('媒体选择器加载失败,请刷新页面后重试', 'aksrt'),
|
||||
'download' => __('下载', 'aksrt'),
|
||||
'confirmLeave' => __('你有未保存的更改,确定要离开吗?', 'jio'),
|
||||
'saving' => __('保存中...', 'jio'),
|
||||
'saved' => __('草稿已保存', 'jio'),
|
||||
'submitting' => __('提交中...', 'jio'),
|
||||
'submitted' => __('投稿已提交', 'jio'),
|
||||
'error' => __('操作失败,请重试', 'jio'),
|
||||
'confirmDelete' => __('确定要删除这个草稿吗?', 'jio'),
|
||||
'deleting' => __('正在删除草稿…', 'jio'),
|
||||
'deleted' => __('草稿已删除', 'jio'),
|
||||
'uploading' => __('正在上传…', 'jio'),
|
||||
'uploaded' => __('上传成功', 'jio'),
|
||||
'fileTooLarge' => __('文件大小超过限制', 'jio'),
|
||||
'lastSaved' => __('最后保存:', 'jio'),
|
||||
'preview' => __('预览文章', 'jio'),
|
||||
'setVideoCoverTitle' => __('为视频设置封面', 'jio'),
|
||||
'close' => __('关闭', 'jio'),
|
||||
'insertImage' => __('插入图片', 'jio'),
|
||||
'uploadImage' => __('上传图片', 'jio'),
|
||||
'externalImage' => __('外链图片', 'jio'),
|
||||
'insertVideo' => __('插入视频', 'jio'),
|
||||
'uploadVideo' => __('上传视频', 'jio'),
|
||||
'externalVideo' => __('外链视频', 'jio'),
|
||||
'embedVideo' => __('嵌入视频', 'jio'),
|
||||
'selectVideo' => __('选择或拖入视频', 'jio'),
|
||||
'videoUploadHint' => __('上传完成后自动插入正文', 'jio'),
|
||||
'externalVideoHint' => __('请填写视频文件地址:', 'jio'),
|
||||
'embedVideoHint' => __('请输入嵌入地址或者直接粘贴 iframe 嵌入代码:', 'jio'),
|
||||
'confirmEmbed' => __('确认嵌入', 'jio'),
|
||||
'insertFile' => __('上传附件', 'jio'),
|
||||
'uploadFile' => __('上传附件', 'jio'),
|
||||
'externalFile' => __('输入地址', 'jio'),
|
||||
'selectFile' => __('选择或拖入附件', 'jio'),
|
||||
'fileUploadHint' => __('上传完成后自动插入正文', 'jio'),
|
||||
'externalFileHint' => __('请填写附件地址:', 'jio'),
|
||||
'selectImages' => __('选择或拖入图片', 'jio'),
|
||||
'imageUploadHint' => __('可批量选择,上传完成后自动插入正文', 'jio'),
|
||||
'selectedFiles' => __('已选择 %d 个文件', 'jio'),
|
||||
'confirmUpload' => __('确认上传', 'jio'),
|
||||
'externalImageHint' => __('每行填写一个图片地址:', 'jio'),
|
||||
'confirmInsert' => __('确认插入', 'jio'),
|
||||
'invalidMediaUrl' => __('请填写有效地址', 'jio'),
|
||||
'invalidVideoUrl' => __('请填写有效的视频嵌入地址', 'jio'),
|
||||
'invalidFile' => __('请选择有效文件', 'jio'),
|
||||
'uploadUnavailable' => __('当前账号不能上传此类文件', 'jio'),
|
||||
'mine' => __('我的媒体', 'jio'),
|
||||
'mineImage' => __('我的图片', 'jio'),
|
||||
'mineVideo' => __('我的视频', 'jio'),
|
||||
'mineFile' => __('我的文件', 'jio'),
|
||||
'search' => __('搜索', 'jio'),
|
||||
'searchMedia' => __('搜索媒体(至少 2 个字符)', 'jio'),
|
||||
'searchMin' => __('请输入至少 2 个字符进行搜索', 'jio'),
|
||||
'clear' => __('清除', 'jio'),
|
||||
'loadMore' => __('加载更多', 'jio'),
|
||||
'loading' => __('加载中…', 'jio'),
|
||||
'empty' => __('暂无媒体文件', 'jio'),
|
||||
'emptyMedia' => __('暂无媒体文件', 'jio'),
|
||||
'mediaError' => __('媒体加载失败', 'jio'),
|
||||
'mediaUnavailable' => __('媒体库暂不可用', 'jio'),
|
||||
'confirmSelected' => __('确认选择(%d)', 'jio'),
|
||||
'maxItems' => __('最多选择 %d 个文件', 'jio'),
|
||||
'maxMediaItems' => __('最多选择 %d 个文件', 'jio'),
|
||||
'uploadingClose' => __('上传中,请稍候再关闭', 'jio'),
|
||||
'mediaPickerUnavailable' => __('媒体选择器加载失败,请刷新页面后重试', 'jio'),
|
||||
'download' => __('下载', 'jio'),
|
||||
|
||||
'quote' => __('引言', 'aksrt'),
|
||||
'quoteGray' => __('灰色引言', 'aksrt'),
|
||||
'quoteRed' => __('红色引言', 'aksrt'),
|
||||
'quoteBlue' => __('蓝色引言', 'aksrt'),
|
||||
'quoteGreen' => __('绿色引言', 'aksrt'),
|
||||
'edit' => __('编辑', 'aksrt'),
|
||||
'insert' => __('插入', 'aksrt'),
|
||||
'highlightCode' => __('高亮代码', 'aksrt'),
|
||||
'selectLanguage' => __('选择语言', 'aksrt'),
|
||||
'codeGeneric' => __('通用高亮', 'aksrt'),
|
||||
'codeTheme' => __('主题', 'aksrt'),
|
||||
'codeFollowGlobal' => __('跟随全局设置', 'aksrt'),
|
||||
'codeLabel' => __('代码:', 'aksrt'),
|
||||
'hiddenContent' => __('隐藏内容', 'aksrt'),
|
||||
'hiddenPlaceholder' => __('隐藏内容', 'aksrt'),
|
||||
'replyVisible' => __('回复可见', 'aksrt'),
|
||||
'loginVisible' => __('登录可见', 'aksrt'),
|
||||
'vipVisible' => __('VIP 可见', 'aksrt'),
|
||||
'payVisible' => __('付费可见', 'aksrt'),
|
||||
'addResource' => __('添加资源', 'aksrt'),
|
||||
'editResource' => __('编辑资源', 'aksrt'),
|
||||
'downloadUrl' => __('下载地址', 'aksrt'),
|
||||
'enterDownloadUrl' => __('请输入资源下载地址', 'aksrt'),
|
||||
'pasteLinkHint' => __('支持直接粘贴网盘分享链接,并自动识别提取码', 'aksrt'),
|
||||
'resourceNote' => __('资源备注', 'aksrt'),
|
||||
'enterResourceNote' => __('请输入资源备注', 'aksrt'),
|
||||
'resourceNoteHint' => __('例如提取码、解压密码等', 'aksrt'),
|
||||
'clickCopy' => __('点击复制', 'aksrt'),
|
||||
'copyName' => __('复制名称', 'aksrt'),
|
||||
'copyContent' => __('复制内容', 'aksrt'),
|
||||
'copyHint' => __('填写后,用户可点击资源备注复制内容', 'aksrt'),
|
||||
'customButton' => __('自定义按钮', 'aksrt'),
|
||||
'customButtonPlaceholder' => __('自定义下载按钮名称', 'aksrt'),
|
||||
'selectButtonStyle' => __('选择按钮样式', 'aksrt'),
|
||||
'extractCode' => __('提取码', 'aksrt'),
|
||||
'extractCodeColon' => __('提取码:', 'aksrt'),
|
||||
'confirm' => __('确认', 'aksrt'),
|
||||
'quote' => __('引言', 'jio'),
|
||||
'quoteGray' => __('灰色引言', 'jio'),
|
||||
'quoteRed' => __('红色引言', 'jio'),
|
||||
'quoteBlue' => __('蓝色引言', 'jio'),
|
||||
'quoteGreen' => __('绿色引言', 'jio'),
|
||||
'edit' => __('编辑', 'jio'),
|
||||
'insert' => __('插入', 'jio'),
|
||||
'highlightCode' => __('高亮代码', 'jio'),
|
||||
'selectLanguage' => __('选择语言', 'jio'),
|
||||
'codeGeneric' => __('通用高亮', 'jio'),
|
||||
'codeTheme' => __('主题', 'jio'),
|
||||
'codeFollowGlobal' => __('跟随全局设置', 'jio'),
|
||||
'codeLabel' => __('代码:', 'jio'),
|
||||
'hiddenContent' => __('隐藏内容', 'jio'),
|
||||
'hiddenPlaceholder' => __('隐藏内容', 'jio'),
|
||||
'replyVisible' => __('回复可见', 'jio'),
|
||||
'loginVisible' => __('登录可见', 'jio'),
|
||||
'vipVisible' => __('VIP 可见', 'jio'),
|
||||
'payVisible' => __('付费可见', 'jio'),
|
||||
'addResource' => __('添加资源', 'jio'),
|
||||
'editResource' => __('编辑资源', 'jio'),
|
||||
'downloadUrl' => __('下载地址', 'jio'),
|
||||
'enterDownloadUrl' => __('请输入资源下载地址', 'jio'),
|
||||
'pasteLinkHint' => __('支持直接粘贴网盘分享链接,并自动识别提取码', 'jio'),
|
||||
'resourceNote' => __('资源备注', 'jio'),
|
||||
'enterResourceNote' => __('请输入资源备注', 'jio'),
|
||||
'resourceNoteHint' => __('例如提取码、解压密码等', 'jio'),
|
||||
'clickCopy' => __('点击复制', 'jio'),
|
||||
'copyName' => __('复制名称', 'jio'),
|
||||
'copyContent' => __('复制内容', 'jio'),
|
||||
'copyHint' => __('填写后,用户可点击资源备注复制内容', 'jio'),
|
||||
'customButton' => __('自定义按钮', 'jio'),
|
||||
'customButtonPlaceholder' => __('自定义下载按钮名称', 'jio'),
|
||||
'selectButtonStyle' => __('选择按钮样式', 'jio'),
|
||||
'extractCode' => __('提取码', 'jio'),
|
||||
'extractCodeColon' => __('提取码:', 'jio'),
|
||||
'confirm' => __('确认', 'jio'),
|
||||
],
|
||||
]);
|
||||
}
|
||||
@@ -239,7 +239,7 @@ if (file_exists($js)) {
|
||||
get_header();
|
||||
?>
|
||||
<main id="main-content" role="main" class="container" tabindex="-1">
|
||||
<form id="aksrt-submit-form" data-aksrt-submit-form data-dirty="false">
|
||||
<form id="jio-submit-form" data-jio-submit-form data-dirty="false">
|
||||
<div class="content-wrap newposts-wrap">
|
||||
<div class="content-layout">
|
||||
<?php
|
||||
@@ -251,7 +251,7 @@ get_header();
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar show-sidebar">
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('newposts_sidebar_top'); ?>
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('newposts_sidebar_top'); ?>
|
||||
<?php
|
||||
$terms = get_template_directory() . '/templates/parts/submit/sidebar-terms.php';
|
||||
if (file_exists($terms)) {
|
||||
@@ -266,7 +266,7 @@ get_header();
|
||||
include $actions;
|
||||
}
|
||||
?>
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('newposts_sidebar_bottom'); ?>
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('newposts_sidebar_bottom'); ?>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
* Thin shell: resolve user → build context → mount parts.
|
||||
* Layout matches legacy author.php: full-width header + tabs (no commerce sidebar).
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
get_header();
|
||||
|
||||
$author_identifier = (string) get_query_var('aksrt_author_identifier');
|
||||
$user = $author_identifier !== '' && function_exists('aksrt_resolve_public_user')
|
||||
? aksrt_resolve_public_user($author_identifier)
|
||||
$author_identifier = (string) get_query_var('jio_author_identifier');
|
||||
$user = $author_identifier !== '' && function_exists('jio_resolve_public_user')
|
||||
? jio_resolve_public_user($author_identifier)
|
||||
: null;
|
||||
|
||||
if (!$user instanceof WP_User) {
|
||||
@@ -22,21 +22,21 @@ if (!$user instanceof WP_User) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_get_user_home_page_context')) {
|
||||
require_once AKSRT_DIR . '/inc/helpers/aksrt-user-home.php';
|
||||
if (!function_exists('jio_get_user_home_page_context')) {
|
||||
require_once JIO_DIR . '/inc/helpers/jio-user-home.php';
|
||||
}
|
||||
|
||||
$ctx = aksrt_get_user_home_page_context($user);
|
||||
$ctx = jio_get_user_home_page_context($user);
|
||||
extract($ctx, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
|
||||
|
||||
require_once AKSRT_DIR . '/templates/parts/user-shared-helpers.php';
|
||||
require_once JIO_DIR . '/templates/parts/user-shared-helpers.php';
|
||||
?>
|
||||
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('author_top_fluid', 'fluid-widget-wrap'); ?>
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('author_top_fluid', 'fluid-widget-wrap'); ?>
|
||||
|
||||
<main id="main-content" class="site-main container content-shell content-shell--stream aksrt-user-home" tabindex="-1">
|
||||
<main id="main-content" class="site-main container content-shell content-shell--stream jio-user-home" tabindex="-1">
|
||||
<div class="content-wrap">
|
||||
<div class="content-layout content-layout--no-sidebar aksrt-user-home__layout">
|
||||
<div class="content-layout content-layout--no-sidebar jio-user-home__layout">
|
||||
<div class="content-layout__primary">
|
||||
<?php
|
||||
get_template_part('templates/parts/user/author-hero', null, [
|
||||
@@ -87,6 +87,6 @@ require_once AKSRT_DIR . '/templates/parts/user-shared-helpers.php';
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('author_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('author_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
Reference in new issue
Block a user