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
@@ -4,14 +4,14 @@
|
||||
*
|
||||
* Expects no output. Returns $ctx array.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$front = class_exists('\AKSRT\Core\FrontSubmit') ? \AKSRT\Core\FrontSubmit::get_instance() : null;
|
||||
$front = class_exists('\Jio\Core\FrontSubmit') ? \Jio\Core\FrontSubmit::get_instance() : null;
|
||||
$user_id = get_current_user_id();
|
||||
$settings = $front ? $front->settings() : (class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_submit_settings() : []);
|
||||
$settings = $front ? $front->settings() : (class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_submit_settings() : []);
|
||||
$enabled = !isset($settings['enabled']) || !empty($settings['enabled']);
|
||||
|
||||
$edit_id = isset($_GET['edit']) ? absint($_GET['edit']) : 0;
|
||||
@@ -38,17 +38,17 @@ $cap = static function (string $c) use ($front, $user_id, $edit_id): bool {
|
||||
if ($front) {
|
||||
return $front->user_can_cap($c, $user_id, $edit_id ?: null);
|
||||
}
|
||||
return function_exists('aksrt_user_can') ? aksrt_user_can($c, $user_id, $edit_id ?: null) : ($user_id > 0);
|
||||
return function_exists('jio_user_can') ? jio_user_can($c, $user_id, $edit_id ?: null) : ($user_id > 0);
|
||||
};
|
||||
|
||||
$post_meta = [];
|
||||
if ($edit_post) {
|
||||
$raw_meta = get_post_meta($edit_post->ID, \AKSRT\Core\DomainModel::POST_META_KEY, true);
|
||||
$raw_meta = get_post_meta($edit_post->ID, \Jio\Core\DomainModel::POST_META_KEY, true);
|
||||
$post_meta = is_array($raw_meta) ? $raw_meta : [];
|
||||
}
|
||||
$pay_meta = ($edit_post && function_exists('aksrt_get_pay_meta'))
|
||||
? aksrt_get_pay_meta($edit_post->ID)
|
||||
: (class_exists('\AKSRT\Core\DomainModel') ? \AKSRT\Core\DomainModel::default_pay_meta() : []);
|
||||
$pay_meta = ($edit_post && function_exists('jio_get_pay_meta'))
|
||||
? jio_get_pay_meta($edit_post->ID)
|
||||
: (class_exists('\Jio\Core\DomainModel') ? \Jio\Core\DomainModel::default_pay_meta() : []);
|
||||
|
||||
// Featured initial args for JS.
|
||||
$featured_args = ['type' => '', 'data' => new stdClass(), 'options' => [
|
||||
@@ -110,8 +110,8 @@ $current_cats = $edit_post ? wp_get_post_categories($edit_post->ID) : [];
|
||||
|
||||
$custom_dimensions = [];
|
||||
$current_cf = [];
|
||||
if (!empty($settings['custom_filter_s']) && class_exists('\AKSRT\Settings\Settings')) {
|
||||
$filter_all = \AKSRT\Settings\Settings::get_post_filter_settings();
|
||||
if (!empty($settings['custom_filter_s']) && class_exists('\Jio\Settings\Settings')) {
|
||||
$filter_all = \Jio\Settings\Settings::get_post_filter_settings();
|
||||
$custom_dimensions = $filter_all['custom_filter'] ?? [];
|
||||
if ($edit_post && !empty($custom_dimensions)) {
|
||||
foreach ($custom_dimensions as $dim) {
|
||||
@@ -119,7 +119,7 @@ if (!empty($settings['custom_filter_s']) && class_exists('\AKSRT\Settings\Settin
|
||||
if ($key === '') {
|
||||
continue;
|
||||
}
|
||||
$current_cf[$key] = get_post_meta($edit_post->ID, '_aksrt_cf_' . $key, true);
|
||||
$current_cf[$key] = get_post_meta($edit_post->ID, '_jio_cf_' . $key, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,12 +146,12 @@ if ($user_id > 0) {
|
||||
}
|
||||
|
||||
// VIP labels / points.
|
||||
$vip = class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'get_vip_settings')
|
||||
? \AKSRT\Settings\Settings::get_vip_settings()
|
||||
$vip = class_exists('\Jio\Settings\Settings') && method_exists('\Jio\Settings\Settings', 'get_vip_settings')
|
||||
? \Jio\Settings\Settings::get_vip_settings()
|
||||
: [];
|
||||
if (empty($vip) && class_exists('\AKSRT\Settings\PaymentRuntime')) {
|
||||
if (empty($vip) && class_exists('\Jio\Settings\PaymentRuntime')) {
|
||||
// Fallback: read common keys.
|
||||
$all = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_all() : [];
|
||||
$all = class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_all() : [];
|
||||
$vip = [
|
||||
'vip1_enabled' => !empty($all['pay_user_vip_1_s']),
|
||||
'vip2_enabled' => !empty($all['pay_user_vip_2_s']),
|
||||
@@ -166,15 +166,15 @@ $vip = [
|
||||
'vip1_name' => (string) ($vip['vip1_name'] ?? $vip_levels[1]['name'] ?? 'VIP1'),
|
||||
'vip2_name' => (string) ($vip['vip2_name'] ?? $vip_levels[2]['name'] ?? 'VIP2'),
|
||||
];
|
||||
$points_enabled = class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'credits_enabled')
|
||||
? \AKSRT\Settings\Settings::credits_enabled()
|
||||
$points_enabled = class_exists('\Jio\Settings\Settings') && method_exists('\Jio\Settings\Settings', 'credits_enabled')
|
||||
? \Jio\Settings\Settings::credits_enabled()
|
||||
: false;
|
||||
|
||||
$submit_label = __('发布', 'aksrt');
|
||||
$submit_label = __('发布', 'jio');
|
||||
if ($is_guest) {
|
||||
$submit_label = __('审核', 'aksrt');
|
||||
$submit_label = __('审核', 'jio');
|
||||
} elseif ($edit_post && in_array($post_status, ['publish', 'pending'], true)) {
|
||||
$submit_label = __('保存', 'aksrt');
|
||||
$submit_label = __('保存', 'jio');
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Main column: cover + title + editor + status.
|
||||
*
|
||||
* @var array $ctx
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -27,7 +27,7 @@ $is_can_new = !empty($ctx['is_can_new']);
|
||||
tabindex="1"
|
||||
rows="1"
|
||||
maxlength="<?php echo esc_attr((string) ((int) ($settings['title_max'] ?? 30) * 4)); ?>"
|
||||
placeholder="<?php echo esc_attr((string) ($settings['title_placeholder'] ?? __('请输入标题', 'aksrt'))); ?>"
|
||||
placeholder="<?php echo esc_attr((string) ($settings['title_placeholder'] ?? __('请输入标题', 'jio'))); ?>"
|
||||
data-auto-height
|
||||
data-max-height="<?php echo wp_is_mobile() ? '110' : '78'; ?>"
|
||||
><?php echo esc_textarea((string) $ctx['current_title']); ?></textarea>
|
||||
@@ -37,24 +37,24 @@ $is_can_new = !empty($ctx['is_can_new']);
|
||||
<?php if (!$is_can_new) : ?>
|
||||
<div class="flex jc newposts-nocan" style="min-height:50vh;">
|
||||
<div class="text-center"><div><i class="fa fas fa-lock"></i></div>
|
||||
<p><?php esc_html_e('无法发布', 'aksrt'); ?></p>
|
||||
<p class="muted-color"><?php esc_html_e('你当前没有前台投稿权限,请联系管理员开通。', 'aksrt'); ?></p></div>
|
||||
<p><?php esc_html_e('无法发布', 'jio'); ?></p>
|
||||
<p class="muted-color"><?php esc_html_e('你当前没有前台投稿权限,请联系管理员开通。', 'jio'); ?></p></div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="newposts-editor">
|
||||
<?php
|
||||
$toolbar1 = ['formatselect', 'bold', 'italic', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'link'];
|
||||
if (!empty($ctx['can_upload_img'])) {
|
||||
$toolbar1[] = 'aksrt_image';
|
||||
$toolbar1[] = 'jio_image';
|
||||
}
|
||||
$toolbar1[] = 'aksrt_video';
|
||||
$toolbar1[] = 'jio_video';
|
||||
if (!empty($ctx['can_upload_file'])) {
|
||||
$toolbar1[] = 'aksrt_file';
|
||||
$toolbar1[] = 'jio_file';
|
||||
}
|
||||
if (!empty($ctx['can_hide'])) {
|
||||
$toolbar1[] = 'aksrt_hide';
|
||||
$toolbar1[] = 'jio_hide';
|
||||
}
|
||||
$toolbar1 = implode(',', array_merge($toolbar1, ['aksrt_quote', 'aksrt_precode', 'fullscreen', 'wp_adv']));
|
||||
$toolbar1 = implode(',', array_merge($toolbar1, ['jio_quote', 'jio_precode', 'fullscreen', 'wp_adv']));
|
||||
$plugins = 'paste,link,lists,fullscreen,wordpress,wplink,charmap,colorpicker,textcolor';
|
||||
$editor_plugin_path = get_template_directory() . '/assets/js/front-submit-editor.js';
|
||||
$editor_plugin_url = get_template_directory_uri() . '/assets/js/front-submit-editor.js';
|
||||
@@ -68,7 +68,7 @@ $is_can_new = !empty($ctx['is_can_new']);
|
||||
}
|
||||
$external_plugins = static function (array $external, string $editor_id) use ($editor_plugin_url): array {
|
||||
if ($editor_id === 'post_content') {
|
||||
$external['aksrt_editor_tools'] = $editor_plugin_url;
|
||||
$external['jio_editor_tools'] = $editor_plugin_url;
|
||||
}
|
||||
return $external;
|
||||
};
|
||||
@@ -100,20 +100,20 @@ $is_can_new = !empty($ctx['is_can_new']);
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="flex ac jsb mt10">
|
||||
<span class="view-btn aksrt-submit-view-btn">
|
||||
<span class="view-btn jio-submit-view-btn">
|
||||
<?php if ($edit_post) : ?>
|
||||
<a class="but c-blue" target="_blank" href="<?php echo esc_url(get_permalink($edit_post)); ?>">
|
||||
<i class="fa fas fa-file-alt"></i> <?php esc_html_e('预览文章', 'aksrt'); ?>
|
||||
<i class="fa fas fa-file-alt"></i> <?php esc_html_e('预览文章', 'jio'); ?>
|
||||
</a>
|
||||
<?php if (current_user_can('manage_options')) : ?>
|
||||
<a class="but c-yellow" href="<?php echo esc_url(get_edit_post_link($edit_post)); ?>">
|
||||
<?php esc_html_e('后台编辑', 'aksrt'); ?>
|
||||
<?php esc_html_e('后台编辑', 'jio'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php elseif (!empty($ctx['draft_count']) && $ctx['user_id'] > 0) : ?>
|
||||
<?php
|
||||
$draft_url = function_exists('aksrt_get_user_center_url')
|
||||
? add_query_arg('post_status', 'draft', aksrt_get_user_center_url('posts'))
|
||||
$draft_url = function_exists('jio_get_user_center_url')
|
||||
? add_query_arg('post_status', 'draft', jio_get_user_center_url('posts'))
|
||||
: '';
|
||||
?>
|
||||
<?php if ($draft_url !== '') : ?>
|
||||
@@ -121,7 +121,7 @@ $is_can_new = !empty($ctx['is_can_new']);
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %d: draft count */
|
||||
esc_html__('您已有 %d 篇草稿 点击查看', 'aksrt'),
|
||||
esc_html__('您已有 %d 篇草稿 点击查看', 'jio'),
|
||||
(int) $ctx['draft_count']
|
||||
);
|
||||
?>
|
||||
@@ -130,9 +130,9 @@ $is_can_new = !empty($ctx['is_can_new']);
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<span class="modified-time aksrt-submit-modified-time">
|
||||
<span class="modified-time jio-submit-modified-time">
|
||||
<?php if (!empty($ctx['post_modified'])) : ?>
|
||||
<span class="badg"><?php echo esc_html(sprintf(__('最后保存:%s', 'aksrt'), $ctx['post_modified'])); ?></span>
|
||||
<span class="badg"><?php echo esc_html(sprintf(__('最后保存:%s', 'jio'), $ctx['post_modified'])); ?></span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Cover featured editor box.
|
||||
*
|
||||
* @var array $ctx
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -49,28 +49,28 @@ $can_video = !empty($ctx['can_cover_video']);
|
||||
<div class="btns-full flex ac jc">
|
||||
<?php if ($can_image || $can_slide) : ?>
|
||||
<button type="button" class="but btn-image" data-featured-action="image"
|
||||
title="<?php esc_attr_e('图片', 'aksrt'); ?>"
|
||||
aria-label="<?php esc_attr_e('图片', 'aksrt'); ?>">
|
||||
title="<?php esc_attr_e('图片', 'jio'); ?>"
|
||||
aria-label="<?php esc_attr_e('图片', 'jio'); ?>">
|
||||
<i class="fa fas fa-image"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<?php if ($can_video) : ?>
|
||||
<button type="button" class="but btn-video-pic" data-featured-action="video_pic"
|
||||
title="<?php esc_attr_e('设置视频封面', 'aksrt'); ?>"
|
||||
aria-label="<?php esc_attr_e('设置视频封面', 'aksrt'); ?>">
|
||||
title="<?php esc_attr_e('设置视频封面', 'jio'); ?>"
|
||||
aria-label="<?php esc_attr_e('设置视频封面', 'jio'); ?>">
|
||||
<i class="fa fas fa-image"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<?php if ($can_video) : ?>
|
||||
<button type="button" class="but btn-video" data-featured-action="video"
|
||||
title="<?php esc_attr_e('视频', 'aksrt'); ?>"
|
||||
aria-label="<?php esc_attr_e('视频', 'aksrt'); ?>">
|
||||
title="<?php esc_attr_e('视频', 'jio'); ?>"
|
||||
aria-label="<?php esc_attr_e('视频', 'jio'); ?>">
|
||||
<i class="fa fas fa-video"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="but c-red btn-delete" data-featured-action="close" <?php echo $type === '' ? 'hidden' : ''; ?>
|
||||
title="<?php esc_attr_e('清除', 'aksrt'); ?>"
|
||||
aria-label="<?php esc_attr_e('清除', 'aksrt'); ?>">
|
||||
title="<?php esc_attr_e('清除', 'jio'); ?>"
|
||||
aria-label="<?php esc_attr_e('清除', 'jio'); ?>">
|
||||
<i class="fa fas fa-trash-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -16,8 +16,8 @@ $vip1_name = (string) ($ctx['vip']['vip1_name'] ?? 'VIP1');
|
||||
$vip2_name = (string) ($ctx['vip']['vip2_name'] ?? 'VIP2');
|
||||
$downloads = is_array($pay['downloads'] ?? null) ? $pay['downloads'] : [];
|
||||
|
||||
if (!function_exists('aksrt_submit_pay_line')) {
|
||||
function aksrt_submit_pay_line(string $label, string $name, string $value, string $step): void {
|
||||
if (!function_exists('jio_submit_pay_line')) {
|
||||
function jio_submit_pay_line(string $label, string $name, string $value, string $step): void {
|
||||
?>
|
||||
<div class="relative mt6"><div class="flex ab"><div class="muted-color mb6 flex0"><?php echo esc_html($label); ?></div><input type="number" min="0" step="<?php echo esc_attr($step); ?>" name="<?php echo esc_attr($name); ?>" value="<?php echo esc_attr($value); ?>" class="line-form-input em2x key-color text-right"><i class="line-form-line"></i></div></div>
|
||||
<?php
|
||||
@@ -25,54 +25,54 @@ if (!function_exists('aksrt_submit_pay_line')) {
|
||||
}
|
||||
?>
|
||||
<div class="zib-widget dependency-box mb10-sm newpost-pay-box" data-pay-box>
|
||||
<div class="title-theme mb10"><?php esc_html_e('付费内容', 'aksrt'); ?></div>
|
||||
<div class="title-theme mb10"><?php esc_html_e('付费内容', 'jio'); ?></div>
|
||||
<div class="flex ac jsb padding-h10 border-bottom">
|
||||
<div class="flex ac"><?php esc_html_e('内容付费', 'aksrt'); ?></div>
|
||||
<div class="flex ac"><?php esc_html_e('内容付费', 'jio'); ?></div>
|
||||
<label class="form-switch-label"><input class="hide" type="checkbox" name="pay_enabled" value="1" <?php checked($enabled); ?> data-pay-toggle><div class="form-switch flex0"></div></label>
|
||||
</div>
|
||||
|
||||
<div data-pay-fields <?php echo $enabled ? '' : 'hidden'; ?>>
|
||||
<?php if ($points_on) : ?>
|
||||
<div class="flex ac jsb padding-h10">
|
||||
<div class="flex ac"><?php esc_html_e('支付类型', 'aksrt'); ?></div>
|
||||
<div class="flex ac"><?php esc_html_e('支付类型', 'jio'); ?></div>
|
||||
<div class="but-average radius em09">
|
||||
<button type="button" class="but p2-10 pointer<?php echo $modo !== 'points' ? ' active' : ''; ?>" data-pay-modo="0"><?php esc_html_e('现金支付', 'aksrt'); ?></button>
|
||||
<button type="button" class="but p2-10 pointer<?php echo $modo === 'points' ? ' active' : ''; ?>" data-pay-modo="points"><?php esc_html_e('积分支付', 'aksrt'); ?></button>
|
||||
<button type="button" class="but p2-10 pointer<?php echo $modo !== 'points' ? ' active' : ''; ?>" data-pay-modo="0"><?php esc_html_e('现金支付', 'jio'); ?></button>
|
||||
<button type="button" class="but p2-10 pointer<?php echo $modo === 'points' ? ' active' : ''; ?>" data-pay-modo="points"><?php esc_html_e('积分支付', 'jio'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="aksrt_pay[pay_modo]" value="<?php echo esc_attr($modo); ?>" data-pay-modo-input>
|
||||
<input type="hidden" name="aksrt_pay[pay_type]" value="<?php echo esc_attr((string) ($pay['pay_type'] ?? 'reading')); ?>" data-pay-type-input>
|
||||
<input type="hidden" name="jio_pay[pay_modo]" value="<?php echo esc_attr($modo); ?>" data-pay-modo-input>
|
||||
<input type="hidden" name="jio_pay[pay_type]" value="<?php echo esc_attr((string) ($pay['pay_type'] ?? 'reading')); ?>" data-pay-type-input>
|
||||
|
||||
<div class="mt10 newpost-pay-price" data-pay-cash <?php echo $modo === 'points' ? 'hidden' : ''; ?>>
|
||||
<?php aksrt_submit_pay_line(__('设置价格', 'aksrt'), 'aksrt_pay[price]', (string) ($pay['price'] ?? ''), '0.01'); ?>
|
||||
<?php if ($manual && $vip1_on) aksrt_submit_pay_line(sprintf(__('%s价格', 'aksrt'), $vip1_name), 'aksrt_pay[vip1_price]', (string) ($pay['vip1_price'] ?? ''), '0.01'); ?>
|
||||
<?php if ($manual && $vip2_on) aksrt_submit_pay_line(sprintf(__('%s价格', 'aksrt'), $vip2_name), 'aksrt_pay[vip2_price]', (string) ($pay['vip2_price'] ?? ''), '0.01'); ?>
|
||||
<?php if ($manual && ($vip1_on || $vip2_on)) : ?><div class="px12 mt6 muted-color"><?php esc_html_e('会员价不能高于普通价,为0则为会员免费', 'aksrt'); ?></div><?php endif; ?>
|
||||
<?php jio_submit_pay_line(__('设置价格', 'jio'), 'jio_pay[price]', (string) ($pay['price'] ?? ''), '0.01'); ?>
|
||||
<?php if ($manual && $vip1_on) jio_submit_pay_line(sprintf(__('%s价格', 'jio'), $vip1_name), 'jio_pay[vip1_price]', (string) ($pay['vip1_price'] ?? ''), '0.01'); ?>
|
||||
<?php if ($manual && $vip2_on) jio_submit_pay_line(sprintf(__('%s价格', 'jio'), $vip2_name), 'jio_pay[vip2_price]', (string) ($pay['vip2_price'] ?? ''), '0.01'); ?>
|
||||
<?php if ($manual && ($vip1_on || $vip2_on)) : ?><div class="px12 mt6 muted-color"><?php esc_html_e('会员价不能高于普通价,为0则为会员免费', 'jio'); ?></div><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mt10 newpost-pay-price" data-pay-points <?php echo $modo !== 'points' ? 'hidden' : ''; ?>>
|
||||
<?php aksrt_submit_pay_line(__('设置积分', 'aksrt'), 'aksrt_pay[points_price]', (string) ($pay['points_price'] ?? ''), '1'); ?>
|
||||
<?php if ($manual && $vip1_on) aksrt_submit_pay_line(sprintf(__('%s积分', 'aksrt'), $vip1_name), 'aksrt_pay[vip1_points]', (string) ($pay['vip1_points'] ?? ''), '1'); ?>
|
||||
<?php if ($manual && $vip2_on) aksrt_submit_pay_line(sprintf(__('%s积分', 'aksrt'), $vip2_name), 'aksrt_pay[vip2_points]', (string) ($pay['vip2_points'] ?? ''), '1'); ?>
|
||||
<?php if ($manual && ($vip1_on || $vip2_on)) : ?><div class="px12 mt6 muted-color"><?php esc_html_e('会员价不能高于普通价,为0则为会员免费', 'aksrt'); ?></div><?php endif; ?>
|
||||
<?php jio_submit_pay_line(__('设置积分', 'jio'), 'jio_pay[points_price]', (string) ($pay['points_price'] ?? ''), '1'); ?>
|
||||
<?php if ($manual && $vip1_on) jio_submit_pay_line(sprintf(__('%s积分', 'jio'), $vip1_name), 'jio_pay[vip1_points]', (string) ($pay['vip1_points'] ?? ''), '1'); ?>
|
||||
<?php if ($manual && $vip2_on) jio_submit_pay_line(sprintf(__('%s积分', 'jio'), $vip2_name), 'jio_pay[vip2_points]', (string) ($pay['vip2_points'] ?? ''), '1'); ?>
|
||||
<?php if ($manual && ($vip1_on || $vip2_on)) : ?><div class="px12 mt6 muted-color"><?php esc_html_e('会员价不能高于普通价,为0则为会员免费', 'jio'); ?></div><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($ctx['can_pay_download'])) : ?>
|
||||
<div class="mt10 pay-dawnload-edit" data-pay-downloads>
|
||||
<div class="flex ac jsb padding-h10">
|
||||
<b><?php esc_html_e('付费下载', 'aksrt'); ?></b>
|
||||
<button type="button" class="pay-dawnload-add but hollow p2-10 px12 c-blue" data-pay-download-add><i class="fa fas fa-plus mr3"></i><?php esc_html_e('添加资源', 'aksrt'); ?></button>
|
||||
<b><?php esc_html_e('付费下载', 'jio'); ?></b>
|
||||
<button type="button" class="pay-dawnload-add but hollow p2-10 px12 c-blue" data-pay-download-add><i class="fa fas fa-plus mr3"></i><?php esc_html_e('添加资源', 'jio'); ?></button>
|
||||
</div>
|
||||
<div class="mt10 px12 lists-box" data-pay-download-list>
|
||||
<?php foreach ($downloads as $index => $row) : ?>
|
||||
<div class="flex ac jsb lists-item" data-pay-download-item>
|
||||
<button type="button" class="flex1 name-link pay-dawnload-add-edit" data-pay-download-edit><?php echo esc_html((string) ($row['url'] ?? '')); ?></button>
|
||||
<button type="button" class="pay-dawnload-add-delete em12 ml10 hollow but cir c-red" data-pay-download-remove aria-label="<?php esc_attr_e('删除资源', 'aksrt'); ?>"><i class="fa far fa-trash-alt" aria-hidden="true"></i></button>
|
||||
<button type="button" class="pay-dawnload-add-delete em12 ml10 hollow but cir c-red" data-pay-download-remove aria-label="<?php esc_attr_e('删除资源', 'jio'); ?>"><i class="fa far fa-trash-alt" aria-hidden="true"></i></button>
|
||||
<div class="hidden-input">
|
||||
<?php foreach (['url', 'attachment_id', 'extract_code', 'copy_key', 'copy_val', 'label', 'class'] as $field) : ?>
|
||||
|
||||
<input type="hidden" name="aksrt_pay[downloads][<?php echo (int) $index; ?>][<?php echo esc_attr($field); ?>]" data-pay-download-field="<?php echo esc_attr($field); ?>" value="<?php echo esc_attr((string) ($row[$field] ?? '')); ?>">
|
||||
<input type="hidden" name="jio_pay[downloads][<?php echo (int) $index; ?>][<?php echo esc_attr($field); ?>]" data-pay-download-field="<?php echo esc_attr($field); ?>" value="<?php echo esc_attr((string) ($row[$field] ?? '')); ?>">
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -81,7 +81,7 @@ if (!function_exists('aksrt_submit_pay_line')) {
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="em09 mt10 muted-2-color"><?php esc_html_e('请确保已经在文中添加了付费可见的隐藏内容或已添加付费下载内容', 'aksrt'); ?></div>
|
||||
<div class="em09 mt10 muted-2-color"><?php esc_html_e('请确保已经在文中添加了付费可见的隐藏内容或已添加付费下载内容', 'jio'); ?></div>
|
||||
</div>
|
||||
<div class="em09 mt10 muted-2-color" data-pay-off-hint <?php echo $enabled ? 'hidden' : ''; ?>><?php esc_html_e('如果您在文章中添加了付费可见的隐藏内容或需要设置付费下载资源,请在此设置付费功能', 'aksrt'); ?></div>
|
||||
<div class="em09 mt10 muted-2-color" data-pay-off-hint <?php echo $enabled ? 'hidden' : ''; ?>><?php esc_html_e('如果您在文章中添加了付费可见的隐藏内容或需要设置付费下载资源,请在此设置付费功能', 'jio'); ?></div>
|
||||
</div>
|
||||
@@ -10,27 +10,27 @@ $can_draft = !empty($ctx['user_id'])
|
||||
?>
|
||||
<div class="zib-widget">
|
||||
<div class="text-center">
|
||||
<p class="separator muted-3-color theme-box"><?php esc_html_e('Are you ready', 'aksrt'); ?></p>
|
||||
<p class="separator muted-3-color theme-box"><?php esc_html_e('Are you ready', 'jio'); ?></p>
|
||||
<input type="hidden" name="posts_id" value="<?php echo esc_attr((string) (int) $ctx['edit_id']); ?>">
|
||||
<input type="hidden" name="status" id="submit-status" value="pending">
|
||||
<input type="hidden" name="_nonce" value="<?php echo esc_attr(wp_create_nonce('aksrt_submit')); ?>">
|
||||
<input type="hidden" name="_nonce" value="<?php echo esc_attr(wp_create_nonce('jio_submit')); ?>">
|
||||
|
||||
<?php if (!$is_can_new) : ?>
|
||||
<p class="em09 muted-3-color theme-box"><?php esc_html_e('暂无发布权限', 'aksrt'); ?></p>
|
||||
<p class="em09 muted-3-color theme-box"><?php esc_html_e('暂无发布权限', 'jio'); ?></p>
|
||||
<?php else : ?>
|
||||
<?php if (!empty($ctx['is_guest'])) : ?>
|
||||
<p class="em09 muted-3-color theme-box"><?php esc_html_e('您当前未登录,不能保存草稿,文章提交后不可再修改!', 'aksrt'); ?></p>
|
||||
<p class="em09 muted-3-color theme-box"><?php esc_html_e('您当前未登录,不能保存草稿,文章提交后不可再修改!', 'jio'); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (function_exists('aksrt_is_captcha_enabled_for') && function_exists('aksrt_render_captcha') && aksrt_is_captcha_enabled_for('front_submit')) : ?>
|
||||
<div class="mb10"><?php aksrt_render_captcha('front_submit'); ?></div>
|
||||
<?php if (function_exists('jio_is_captcha_enabled_for') && function_exists('jio_render_captcha') && jio_is_captcha_enabled_for('front_submit')) : ?>
|
||||
<div class="mb10"><?php jio_render_captcha('front_submit'); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="but-average">
|
||||
<?php if ($can_draft) : ?>
|
||||
<button type="button" class="but jb-green new-posts-submit aksrt-submit-btn padding-lg" data-action="posts_draft"><i class="fa fas fa-fw fa-dot-circle"></i><?php esc_html_e('保存草稿', 'aksrt'); ?></button>
|
||||
<button type="button" class="but jb-green new-posts-submit jio-submit-btn padding-lg" data-action="posts_draft"><i class="fa fas fa-fw fa-dot-circle"></i><?php esc_html_e('保存草稿', 'jio'); ?></button>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="but jb-blue new-posts-submit aksrt-submit-btn padding-lg" data-action="posts_save" id="aksrt-submit-btn"><i class="fa fas fa-fw fa-check-square"></i><?php printf(esc_html__('提交%s', 'aksrt'), esc_html((string) $ctx['submit_label'])); ?></button>
|
||||
<button type="button" class="but jb-blue new-posts-submit jio-submit-btn padding-lg" data-action="posts_save" id="jio-submit-btn"><i class="fa fas fa-fw fa-check-square"></i><?php printf(esc_html__('提交%s', 'jio'), esc_html((string) $ctx['submit_label'])); ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Reference-theme article parameters sidebar.
|
||||
*
|
||||
* @var array $ctx
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -14,28 +14,28 @@ require_once get_template_directory() . '/templates/parts/submit/term-checks.php
|
||||
|
||||
<?php if (!empty($ctx['is_guest'])) : ?>
|
||||
<div class="zib-widget mb10-sm newpost-user-inputs">
|
||||
<div class="title-theme mb10"><?php esc_html_e('用户信息', 'aksrt'); ?></div>
|
||||
<p class="muted-3-color em09"><?php esc_html_e('请输入昵称', 'aksrt'); ?></p>
|
||||
<div class="mb20"><input class="form-control" type="text" name="user_name" placeholder="<?php esc_attr_e('请输入昵称', 'aksrt'); ?>" required></div>
|
||||
<p class="muted-3-color em09"><?php esc_html_e('请输入您的联系方式', 'aksrt'); ?></p>
|
||||
<input class="form-control" type="text" name="contact_details" placeholder="<?php esc_attr_e('输入联系方式', 'aksrt'); ?>">
|
||||
<div class="title-theme mb10"><?php esc_html_e('用户信息', 'jio'); ?></div>
|
||||
<p class="muted-3-color em09"><?php esc_html_e('请输入昵称', 'jio'); ?></p>
|
||||
<div class="mb20"><input class="form-control" type="text" name="user_name" placeholder="<?php esc_attr_e('请输入昵称', 'jio'); ?>" required></div>
|
||||
<p class="muted-3-color em09"><?php esc_html_e('请输入您的联系方式', 'jio'); ?></p>
|
||||
<input class="form-control" type="text" name="contact_details" placeholder="<?php esc_attr_e('输入联系方式', 'jio'); ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="zib-widget mb10-sm">
|
||||
<div class="title-theme mb10"><?php esc_html_e('文章参数', 'aksrt'); ?></div>
|
||||
<div class="title-theme mb10"><?php esc_html_e('文章参数', 'jio'); ?></div>
|
||||
<div class="term-select-box">
|
||||
<div class="newpost-cat-drop drop-select dropdown dependency-box">
|
||||
<button type="button" data-toggle-class="open" data-target=".newpost-cat-drop" class="flex ac jsb drop-btn form-control mb6">
|
||||
<span class="title-theme222"><i class="fa fas fa-folder-open mr6" aria-hidden="true"></i><?php esc_html_e('分类', 'aksrt'); ?></span><i class="ml6 fa fas fa-angle-right em12"></i>
|
||||
<span class="title-theme222"><i class="fa fas fa-folder-open mr6" aria-hidden="true"></i><?php esc_html_e('分类', 'jio'); ?></span><i class="ml6 fa fas fa-angle-right em12"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu fluid">
|
||||
<div class="mini-scrollbar padding-w10 select-drop-box">
|
||||
<?php
|
||||
if (!empty($ctx['categories'])) {
|
||||
aksrt_submit_render_term_checks($ctx['categories'], array_map('intval', $ctx['current_cats']), 'category');
|
||||
jio_submit_render_term_checks($ctx['categories'], array_map('intval', $ctx['current_cats']), 'category');
|
||||
} else {
|
||||
echo esc_html__('暂无可选择的分类', 'aksrt');
|
||||
echo esc_html__('暂无可选择的分类', 'jio');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -70,8 +70,8 @@ require_once get_template_directory() . '/templates/parts/submit/term-checks.php
|
||||
</div>
|
||||
|
||||
<?php if (!empty($settings['allow_tags'])) : ?>
|
||||
<div class="title-theme mb10 mt20"><?php esc_html_e('标签', 'aksrt'); ?></div>
|
||||
<p class="muted-3-color em09"><?php esc_html_e('填写文章的标签,每个标签用逗号隔开', 'aksrt'); ?></p>
|
||||
<textarea class="form-control" rows="3" name="tags" placeholder="<?php esc_attr_e('输入文章标签', 'aksrt'); ?>" tabindex="6"><?php echo esc_textarea((string) $ctx['current_tags']); ?></textarea>
|
||||
<div class="title-theme mb10 mt20"><?php esc_html_e('标签', 'jio'); ?></div>
|
||||
<p class="muted-3-color em09"><?php esc_html_e('填写文章的标签,每个标签用逗号隔开', 'jio'); ?></p>
|
||||
<textarea class="form-control" rows="3" name="tags" placeholder="<?php esc_attr_e('输入文章标签', 'jio'); ?>" tabindex="6"><?php echo esc_textarea((string) $ctx['current_tags']); ?></textarea>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -10,8 +10,8 @@
|
||||
*/
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('aksrt_submit_render_term_checks')) :
|
||||
function aksrt_submit_render_term_checks(array $terms, array $checked, string $name, int $parent = 0, int $depth = 0): void {
|
||||
if (!function_exists('jio_submit_render_term_checks')) :
|
||||
function jio_submit_render_term_checks(array $terms, array $checked, string $name, int $parent = 0, int $depth = 0): void {
|
||||
$children_map = [];
|
||||
foreach ($terms as $term) {
|
||||
if (!$term instanceof WP_Term) {
|
||||
@@ -31,7 +31,7 @@ if (!function_exists('aksrt_submit_render_term_checks')) :
|
||||
foreach ($children_map[$pid] as $term) {
|
||||
$tid = (int) $term->term_id;
|
||||
$pad = $d > 0 ? ' style="margin-left:' . (int) ($d * 16) . 'px"' : '';
|
||||
echo '<div' . $pad . '><label class="aksrt-submit-check">';
|
||||
echo '<div' . $pad . '><label class="jio-submit-check">';
|
||||
echo '<input type="checkbox" name="' . esc_attr($name) . '[]" value="' . esc_attr((string) $tid) . '"' . (in_array($tid, $checked, true) ? ' checked' : '') . '>';
|
||||
echo '<span>' . esc_html($term->name) . '</span></label></div>';
|
||||
$render($tid, $d + 1);
|
||||
@@ -45,7 +45,7 @@ if (!function_exists('aksrt_submit_render_term_checks')) :
|
||||
continue;
|
||||
}
|
||||
$tid = (int) $term->term_id;
|
||||
echo '<div><label class="aksrt-submit-check">';
|
||||
echo '<div><label class="jio-submit-check">';
|
||||
echo '<input type="checkbox" name="' . esc_attr($name) . '[]" value="' . esc_attr((string) $tid) . '"' . (in_array($tid, $checked, true) ? ' checked' : '') . '>';
|
||||
echo '<span>' . esc_html($term->name) . '</span></label></div>';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user