refactor(assets): vendor 资产迁入标准目录并全仓去除 zibll 标识
- assets/vendor 全量迁移: fontawesome5→assets/fontawesome5, css→assets/css, js→assets/js/runtime(避开 14 个同名自有文件), img 合并去重→assets/img, fonts→assets/fonts; 删除 assets/vendor - libs 五个与 widgets/third-party 字节相同的库不重复入库, loader paths 改指向 - 运行时切换: _win.uri=assets 根, loader baseUrl=/js/runtime, enlighter 注入 路径同步; PHP 7 个引用文件切换并改名 $zibll_*→$runtime_* - 去品牌: Qinver 头注释/品牌 console.log/演示链接清除, 默认文案中性化 - 功能标识符改名: zib__→aksrt__, zib_ajax→aksrt_ajax, window.zib→ window.aksrtLegacy, zibllblock/*→aksrtblock/*, .zib-widget→.aksrt-panel, .zib-slider→.aksrt-slider, zib_menu_options meta 键等 - 自有 CSS 改名: legacy-utilities/compat-vars/footer shell - admin SPA 重建; 契约测试同步(路径/断言/文件更名) - 例外保留: tests/visual 对照环境与 fixtures 前缀(外部 Zibll 产品引用) 验证: php -l 133 个改动文件通过; runtime 86 个 JS node --check 通过; 契约测试 68/70(2 个失败经 stash 对照确认为存量问题)
This commit is contained in:
1 parent
4f2391fb64
commit
9375b1c30c
591 files changed
+1690
-11041
No files matched your search
+1
-1
@@ -113,7 +113,7 @@ class Admin {
|
||||
// Use the same local FA5 pack as the public stack.
|
||||
wp_enqueue_style(
|
||||
'aksrt-font-awesome',
|
||||
get_template_directory_uri() . '/assets/vendor/fontawesome5/css/all.min.css',
|
||||
get_template_directory_uri() . '/assets/fontawesome5/css/all.min.css',
|
||||
[],
|
||||
'5.15.4'
|
||||
);
|
||||
|
||||
@@ -85,7 +85,7 @@ class PayOrders {
|
||||
? \AKSRT\Core\DomainModel::order_status_labels()
|
||||
: [];
|
||||
|
||||
// Type tabs (zibll order subsubsub parity).
|
||||
// Type tabs (legacy order subsubsub parity).
|
||||
$type_tabs = [
|
||||
'' => __('全部类型', 'aksrt'),
|
||||
'resource' => __('内容付费', 'aksrt'),
|
||||
@@ -177,7 +177,7 @@ class PayOrders {
|
||||
}
|
||||
echo '</form>';
|
||||
|
||||
// Hygiene actions (zibll clear_order / delete).
|
||||
// Hygiene actions (legacy clear_order / delete).
|
||||
echo '<p style="margin:8px 0 12px;">';
|
||||
echo '<form method="post" action="' . esc_url(admin_url('admin-post.php')) . '" style="display:inline;" onsubmit="return confirm(\'' . esc_js(__('将删除 14 天前所有已关闭/已过期订单,不可恢复。确认清理?', 'aksrt')) . '\');">';
|
||||
echo '<input type="hidden" name="action" value="aksrt_pay_clear_closed_orders" />';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Native WP nav-menu item options using Zibll's zib_menu_options meta contract.
|
||||
* Native WP nav-menu item options using legacy's aksrt_menu_options meta contract.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
@@ -41,7 +41,7 @@ class NavMenuOptions {
|
||||
*/
|
||||
public static function render_fields($item_id, $item): void {
|
||||
$item_id = (int) $item_id;
|
||||
$opts = get_post_meta($item_id, 'zib_menu_options', true);
|
||||
$opts = get_post_meta($item_id, 'aksrt_menu_options', true);
|
||||
$opts = is_array($opts) ? $opts : [];
|
||||
$icon = (string) ($opts['icon'] ?? '');
|
||||
$badge = (string) ($opts['badge'] ?? '');
|
||||
@@ -59,7 +59,7 @@ class NavMenuOptions {
|
||||
<label for="edit-menu-item-aksrt-icon-<?php echo esc_attr((string) $item_id); ?>">
|
||||
<?php esc_html_e('图标 class(如 fa fas fa-home)', 'aksrt'); ?><br>
|
||||
<input type="text" id="edit-menu-item-aksrt-icon-<?php echo esc_attr((string) $item_id); ?>"
|
||||
class="widefat" name="zib_menu_options[<?php echo esc_attr((string) $item_id); ?>][icon]"
|
||||
class="widefat" name="aksrt_menu_options[<?php echo esc_attr((string) $item_id); ?>][icon]"
|
||||
value="<?php echo esc_attr($icon); ?>">
|
||||
</label>
|
||||
</p>
|
||||
@@ -67,7 +67,7 @@ class NavMenuOptions {
|
||||
<label for="edit-menu-item-aksrt-badge-<?php echo esc_attr((string) $item_id); ?>">
|
||||
<?php esc_html_e('徽章文字', 'aksrt'); ?><br>
|
||||
<input type="text" id="edit-menu-item-aksrt-badge-<?php echo esc_attr((string) $item_id); ?>"
|
||||
class="widefat" name="zib_menu_options[<?php echo esc_attr((string) $item_id); ?>][badge]"
|
||||
class="widefat" name="aksrt_menu_options[<?php echo esc_attr((string) $item_id); ?>][badge]"
|
||||
value="<?php echo esc_attr($badge); ?>">
|
||||
</label>
|
||||
</p>
|
||||
@@ -75,13 +75,13 @@ class NavMenuOptions {
|
||||
<label for="edit-menu-item-aksrt-badge-class-<?php echo esc_attr((string) $item_id); ?>">
|
||||
<?php esc_html_e('徽章 class', 'aksrt'); ?><br>
|
||||
<input type="text" id="edit-menu-item-aksrt-badge-class-<?php echo esc_attr((string) $item_id); ?>"
|
||||
class="widefat" name="zib_menu_options[<?php echo esc_attr((string) $item_id); ?>][badge_class]"
|
||||
class="widefat" name="aksrt_menu_options[<?php echo esc_attr((string) $item_id); ?>][badge_class]"
|
||||
value="<?php echo esc_attr($badge_class); ?>">
|
||||
</label>
|
||||
</p>
|
||||
<p class="field-aksrt-submenu description description-wide">
|
||||
<label>
|
||||
<input type="checkbox" name="zib_menu_options[<?php echo esc_attr((string) $item_id); ?>][submenu_s]" value="1" <?php checked($submenu_s); ?>>
|
||||
<input type="checkbox" name="aksrt_menu_options[<?php echo esc_attr((string) $item_id); ?>][submenu_s]" value="1" <?php checked($submenu_s); ?>>
|
||||
<?php esc_html_e('启用高级子菜单(仅一级菜单)', 'aksrt'); ?>
|
||||
</label>
|
||||
</p>
|
||||
@@ -89,7 +89,7 @@ class NavMenuOptions {
|
||||
<label for="edit-menu-item-aksrt-submenu-type-<?php echo esc_attr((string) $item_id); ?>">
|
||||
<?php esc_html_e('高级子菜单类型', 'aksrt'); ?><br>
|
||||
<select id="edit-menu-item-aksrt-submenu-type-<?php echo esc_attr((string) $item_id); ?>"
|
||||
name="zib_menu_options[<?php echo esc_attr((string) $item_id); ?>][submenu_type]">
|
||||
name="aksrt_menu_options[<?php echo esc_attr((string) $item_id); ?>][submenu_type]">
|
||||
<option value="" <?php selected($submenu_type, ''); ?>><?php esc_html_e('无', 'aksrt'); ?></option>
|
||||
<option value="graphic_card" <?php selected($submenu_type, 'graphic_card'); ?>><?php esc_html_e('图文卡片', 'aksrt'); ?></option>
|
||||
<option value="multi_column_links" <?php selected($submenu_type, 'multi_column_links'); ?>><?php esc_html_e('多列链接', 'aksrt'); ?></option>
|
||||
@@ -100,14 +100,14 @@ class NavMenuOptions {
|
||||
<label for="edit-menu-item-aksrt-graphic-<?php echo esc_attr((string) $item_id); ?>">
|
||||
<?php esc_html_e('图文卡片 JSON(type=graphic_card)', 'aksrt'); ?><br>
|
||||
<textarea rows="8" class="widefat code" id="edit-menu-item-aksrt-graphic-<?php echo esc_attr((string) $item_id); ?>"
|
||||
name="zib_menu_options[<?php echo esc_attr((string) $item_id); ?>][graphic_card_opts_json]"><?php echo esc_textarea((string) $graphic_json); ?></textarea>
|
||||
name="aksrt_menu_options[<?php echo esc_attr((string) $item_id); ?>][graphic_card_opts_json]"><?php echo esc_textarea((string) $graphic_json); ?></textarea>
|
||||
</label>
|
||||
</p>
|
||||
<p class="field-aksrt-multi description description-wide">
|
||||
<label for="edit-menu-item-aksrt-multi-<?php echo esc_attr((string) $item_id); ?>">
|
||||
<?php esc_html_e('多列链接 JSON(type=multi_column_links)', 'aksrt'); ?><br>
|
||||
<textarea rows="8" class="widefat code" id="edit-menu-item-aksrt-multi-<?php echo esc_attr((string) $item_id); ?>"
|
||||
name="zib_menu_options[<?php echo esc_attr((string) $item_id); ?>][multi_column_links_opts_json]"><?php echo esc_textarea((string) $multi_json); ?></textarea>
|
||||
name="aksrt_menu_options[<?php echo esc_attr((string) $item_id); ?>][multi_column_links_opts_json]"><?php echo esc_textarea((string) $multi_json); ?></textarea>
|
||||
</label>
|
||||
</p>
|
||||
<?php
|
||||
@@ -120,11 +120,11 @@ class NavMenuOptions {
|
||||
public static function save($menu_id, $menu_item_db_id): void {
|
||||
$menu_item_db_id = (int) $menu_item_db_id;
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
||||
if (empty($_POST['zib_menu_options'][ $menu_item_db_id ]) || !is_array($_POST['zib_menu_options'][ $menu_item_db_id ])) {
|
||||
if (empty($_POST['aksrt_menu_options'][ $menu_item_db_id ]) || !is_array($_POST['aksrt_menu_options'][ $menu_item_db_id ])) {
|
||||
return;
|
||||
}
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
||||
$raw = wp_unslash($_POST['zib_menu_options'][ $menu_item_db_id ]);
|
||||
$raw = wp_unslash($_POST['aksrt_menu_options'][ $menu_item_db_id ]);
|
||||
|
||||
$clean = [
|
||||
'icon' => sanitize_text_field((string) ($raw['icon'] ?? '')),
|
||||
@@ -143,7 +143,7 @@ class NavMenuOptions {
|
||||
$clean['multi_column_links_opts'] = self::sanitize_multi_opts($multi);
|
||||
}
|
||||
|
||||
update_post_meta($menu_item_db_id, 'zib_menu_options', $clean);
|
||||
update_post_meta($menu_item_db_id, 'aksrt_menu_options', $clean);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Per-page Zibll header slider configuration.
|
||||
* Per-page legacy header slider configuration.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
@@ -272,12 +272,12 @@ final class PageConfigMetaBox {
|
||||
|
||||
/** @return list<array<string,mixed>> */
|
||||
private static function slide_defaults(): array {
|
||||
$base = defined('AKSRT_URI') ? trailingslashit(AKSRT_URI) . 'assets/vendor/zibll/img/' : '';
|
||||
$base = defined('AKSRT_URI') ? trailingslashit(AKSRT_URI) . 'assets/img/' : '';
|
||||
$slides = [];
|
||||
foreach (['slider-bg.jpg', 'user_t.jpg'] as $image) {
|
||||
$slides[] = [
|
||||
'background' => $base . $image,
|
||||
'link' => ['url' => 'https://www.zibll.com/', 'target' => '_blank'],
|
||||
'link' => ['url' => home_url('/'), 'target' => '_blank'],
|
||||
'text' => ['desc' => '', 'title' => ''],
|
||||
'text_align' => 'left-bottom', 'text_parallax' => 30,
|
||||
'text_size_m' => 20, 'text_size_pc' => 30,
|
||||
|
||||
@@ -76,7 +76,7 @@ class GlobalSchema {
|
||||
['key' => 'seo_description', 'label' => 'SEO描述(description)', 'type' => 'textarea', 'default' => ''],
|
||||
]],
|
||||
['key' => 'ai-seo', 'title' => 'AI SEO 提示词', 'fields' => [
|
||||
['key' => 'ai_seo_title_prompt', 'label' => '标题提示词', 'type' => 'textarea', 'default' => '', 'dependsOn' => ['key' => 'seo_ai_enabled', 'value' => true], 'help' => '留空使用内置 Zibll 风格默认提示词。'],
|
||||
['key' => 'ai_seo_title_prompt', 'label' => '标题提示词', 'type' => 'textarea', 'default' => '', 'dependsOn' => ['key' => 'seo_ai_enabled', 'value' => true], 'help' => '留空使用内置 原主题风格默认提示词。'],
|
||||
['key' => 'ai_seo_keywords_prompt', 'label' => '关键词提示词', 'type' => 'textarea', 'default' => '', 'dependsOn' => ['key' => 'seo_ai_enabled', 'value' => true], 'help' => '留空使用内置默认。'],
|
||||
['key' => 'ai_seo_description_prompt', 'label' => '描述提示词', 'type' => 'textarea', 'default' => '', 'dependsOn' => ['key' => 'seo_ai_enabled', 'value' => true], 'help' => '留空使用内置默认。'],
|
||||
]],
|
||||
@@ -471,11 +471,11 @@ class GlobalSchema {
|
||||
['label' => 'Español', 'value' => 'es'],
|
||||
['label' => 'Русский', 'value' => 'ru'],
|
||||
]],
|
||||
['key' => 'i18n_auto_detect', 'label' => '自动检测浏览器语言', 'type' => 'switch', 'default' => true, 'help' => '基于浏览器 Accept-Language 自动切换(AKSRT 方案,区别于 zibll IP 定位方案)'],
|
||||
['key' => 'i18n_auto_detect', 'label' => '自动检测浏览器语言', 'type' => 'switch', 'default' => true, 'help' => '基于浏览器 Accept-Language 自动切换(AKSRT 方案,区别于 legacy IP 定位方案)'],
|
||||
]],
|
||||
['key' => 'languages', 'title' => '语言管理', 'fields' => [
|
||||
['key' => 'i18n_available_langs', 'label' => '可用语言列表', 'type' => 'textarea', 'default' => "zh-CN|简体中文\nen|English\nzh-TW|繁體中文\nja|日本語\nko|한국어\nfr|Français\nde|Deutsch\nes|Español\nru|Русский", 'help' => '每行一个语言,格式:代码|名称(9 种内置语言)'],
|
||||
['key' => 'i18n_nomenclature', 'label' => '自定义术语', 'type' => 'code', 'default' => '', 'help' => 'JSON 格式自定义翻译术语(key => 翻译),对齐 zibll nomenclature'],
|
||||
['key' => 'i18n_nomenclature', 'label' => '自定义术语', 'type' => 'code', 'default' => '', 'help' => 'JSON 格式自定义翻译术语(key => 翻译),对齐 legacy nomenclature'],
|
||||
]],
|
||||
['key' => 'display', 'title' => '展示设置', 'fields' => [
|
||||
['key' => 'i18n_switcher_position', 'label' => '语言切换器位置', 'type' => 'radio', 'default' => 'footer', 'options' => [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Zibll V9.0 page/display settings contract.
|
||||
* legacy V9.0 page/display settings contract.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
@@ -52,7 +52,7 @@ class SchemaPageDisplay {
|
||||
self::field('nav_scroll_down_hide', '页面向下滚动时隐藏', 'switcher', true, ['dependsOn' => self::enabled('nav_fixed'), 'description' => '下滚动隐藏,上滚动显示。']),
|
||||
self::field('nav_newposts', 'Add发布按钮', 'switcher', true, ['description' => '顶部导航显示文章投稿按钮。']),
|
||||
self::field('nav_newposts_radius', '按钮圆角', 'switcher', true, ['dependsOn' => self::enabled('nav_newposts')]),
|
||||
self::field('nav_newposts_class', '按钮颜色', 'palette', 'jb-blue', ['dependsOn' => self::enabled('nav_newposts'), 'options' => self::zib_palette()]),
|
||||
self::field('nav_newposts_class', '按钮颜色', 'palette', 'jb-blue', ['dependsOn' => self::enabled('nav_newposts'), 'options' => self::aksrt_palette()]),
|
||||
self::field('nav_newposts_text', '按钮文案', 'textarea', '<i class="fa fa-fw fa-pencil"></i>发布', ['dependsOn' => self::enabled('nav_newposts'), 'sanitize_type' => 'html', 'rows' => 1]),
|
||||
]);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ class SchemaPageDisplay {
|
||||
}
|
||||
|
||||
private static function footer(): array {
|
||||
$img = self::asset('assets/vendor/zibll/img/');
|
||||
$img = self::asset('assets/img/');
|
||||
return self::section('footer', '底部页脚', [
|
||||
self::field('footer_theme_custom', '自定义底部页脚颜色', 'switcher', false),
|
||||
self::field('footer_theme_bg_custom', '底部页脚:背景色', 'color', '', ['dependsOn' => self::enabled('footer_theme_custom')]),
|
||||
@@ -85,8 +85,8 @@ class SchemaPageDisplay {
|
||||
self::field('footer_t1_img', '日间模式图片', 'upload', $img . 'logo.png'),
|
||||
self::field('footer_t1_img_dark', '夜间模式图片', 'upload', $img . 'logo_dark.png'),
|
||||
self::field('footer_t1_t', '首行文字', 'text', ''),
|
||||
self::field('fcode_t1_code', '更多内容', 'textarea', 'Zibll 子比主题专为博客、自媒体、资讯类的网站设计开发,简约优雅的设计风格,全面的前端用户功能,简单的模块化配置,欢迎您的体验', ['sanitize_type' => 'html', 'rows' => 3]),
|
||||
self::field('fcode_t2_code_1', '版块二第一行', 'textarea', '<a href="https://zibll.com">友链申请</a>' . "\n" . '<a href="https://zibll.com">免责声明</a>' . "\n" . '<a href="https://zibll.com">广告合作</a>' . "\n" . '<a href="https://zibll.com">关于我们</a>', ['sanitize_type' => 'html', 'rows' => 4]),
|
||||
self::field('fcode_t1_code', '更多内容', 'textarea', 'AKSRT 主题专为博客、自媒体、资讯类的网站设计开发,简约优雅的设计风格,全面的前端用户功能,简单的模块化配置,欢迎您的体验', ['sanitize_type' => 'html', 'rows' => 3]),
|
||||
self::field('fcode_t2_code_1', '版块二第一行', 'textarea', '<a href="#">友链申请</a>' . "\n" . '<a href="#">免责声明</a>' . "\n" . '<a href="#">广告合作</a>' . "\n" . '<a href="#">关于我们</a>', ['sanitize_type' => 'html', 'rows' => 4]),
|
||||
self::field('fcode_t2_code_2', '版块二第二行', 'textarea', self::copyright_default(), ['sanitize_type' => 'html', 'rows' => 3]),
|
||||
self::field('footer_contact_m_s', '图标联系方式移动端显示', 'switcher', true),
|
||||
self::field('footer_contact_wechat_img', '微信二维码', 'upload', $img . 'qrcode.png'),
|
||||
@@ -120,7 +120,7 @@ class SchemaPageDisplay {
|
||||
return self::section('category', '分类页面', [
|
||||
self::field('page_cover_cat_s', '显示封面图', 'switcher', true),
|
||||
self::field('cat_post_count_s', '显示文章数量', 'switcher', true),
|
||||
self::field('cat_default_cover', '封面图', 'upload', self::asset('assets/vendor/zibll/img/user_t.jpg'), ['dependsOn' => self::enabled('page_cover_cat_s'), 'help' => '默认封面图,建议尺寸2000x800。']),
|
||||
self::field('cat_default_cover', '封面图', 'upload', self::asset('assets/img/user_t.jpg'), ['dependsOn' => self::enabled('page_cover_cat_s'), 'help' => '默认封面图,建议尺寸2000x800。']),
|
||||
self::field('cat_orderby_s', '排序方式按钮', 'switcher', true),
|
||||
self::field('cat_orderby_option', '排序方式设置', 'fieldset', [], ['dependsOn' => self::enabled('cat_orderby_s'), 'fields' => self::orderby_fields()]),
|
||||
self::notice('AJAX筛选菜单列表:显示分类、标签菜单,通过 AJAX 获取内容。'),
|
||||
@@ -135,7 +135,7 @@ class SchemaPageDisplay {
|
||||
return self::section('tag', '标签页面', [
|
||||
self::field('tag_post_count_s', '显示文章数量', 'switcher', true),
|
||||
self::field('page_cover_tag_s', '显示封面图', 'switcher', true),
|
||||
self::field('tag_default_cover', '封面图', 'upload', self::asset('assets/vendor/zibll/img/user_t.jpg'), ['dependsOn' => self::enabled('page_cover_tag_s'), 'help' => '默认封面图,建议尺寸2000x800。']),
|
||||
self::field('tag_default_cover', '封面图', 'upload', self::asset('assets/img/user_t.jpg'), ['dependsOn' => self::enabled('page_cover_tag_s'), 'help' => '默认封面图,建议尺寸2000x800。']),
|
||||
self::field('tag_orderby_s', '排序方式按钮', 'switcher', true),
|
||||
self::field('tag_orderby_option', '排序方式设置', 'fieldset', [], ['dependsOn' => self::enabled('tag_orderby_s'), 'fields' => self::orderby_fields()]),
|
||||
self::notice('AJAX筛选菜单列表:显示分类、标签菜单,通过 AJAX 获取内容。'),
|
||||
@@ -160,7 +160,7 @@ class SchemaPageDisplay {
|
||||
private static function other(): array {
|
||||
return self::section('other', '其它页面', [
|
||||
self::field('page_header_style', '页面标题', 'radio', '', ['options' => self::options(['' => '不显示', '1' => '简单样式', '2' => '卡片样式', '3' => '封面图样式'])]),
|
||||
self::field('page_header_cover_img', '页面封面图', 'upload', self::asset('assets/vendor/zibll/img/user_t.jpg')),
|
||||
self::field('page_header_cover_img', '页面封面图', 'upload', self::asset('assets/img/user_t.jpg')),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -181,13 +181,13 @@ class SchemaPageDisplay {
|
||||
}
|
||||
|
||||
private static function card_fields(): array {
|
||||
return [self::field('icon_radius4', '方形图标', 'switcher', false), self::field('cards', '添加卡片', 'group', [], ['button_title' => '添加内容', 'fields' => [self::field('title', '文案标题', 'textarea', '', ['sanitize_type' => 'html']), self::field('desc', '文案简介', 'textarea', '', ['sanitize_type' => 'html']), self::field('icon', '选择图标', 'icon', 'fa fa-magic'), self::field('customize_icon', '自定义图标', 'textarea', '', ['sanitize_type' => 'html']), self::field('icon_class', '图标颜色', 'palette', 'c-yellow', ['options' => self::zib_palette(true)]), self::field('link', '跳转链接', 'link', [])]])];
|
||||
return [self::field('icon_radius4', '方形图标', 'switcher', false), self::field('cards', '添加卡片', 'group', [], ['button_title' => '添加内容', 'fields' => [self::field('title', '文案标题', 'textarea', '', ['sanitize_type' => 'html']), self::field('desc', '文案简介', 'textarea', '', ['sanitize_type' => 'html']), self::field('icon', '选择图标', 'icon', 'fa fa-magic'), self::field('customize_icon', '自定义图标', 'textarea', '', ['sanitize_type' => 'html']), self::field('icon_class', '图标颜色', 'palette', 'c-yellow', ['options' => self::aksrt_palette(true)]), self::field('link', '跳转链接', 'link', [])]])];
|
||||
}
|
||||
|
||||
private static function orderby_fields(): array { return [self::field('lists', '显示排序方式', 'select', ['modified', 'views', 'like', 'comment_count'], ['multiple' => true, 'sortable' => true, 'options' => self::post_order_options(false)]), self::field('dropdown', '更多排序方式', 'switcher', false)]; }
|
||||
private static function ajax_fields(string $source): array { return [self::field('lists', '按钮列表', 'async_select', [], ['source' => $source, 'multiple' => true, 'sortable' => true]), self::field('dropdown', '下拉列表', 'switcher', false), self::field('dropdown_lists', '下拉菜单列表', 'async_select', [], ['dependsOn' => self::enabled('dropdown'), 'source' => $source, 'multiple' => true, 'sortable' => true])]; }
|
||||
private static function footer_image_fields(): array { return [self::field('text', '显示文字', 'text', ''), self::field('image', '显示图片', 'upload', ''), self::field('link', '点击跳转', 'link', [])]; }
|
||||
private static function header_slider_defaults(): array { $img = self::asset('assets/vendor/zibll/img/'); return [['background' => $img . 'slider-bg.jpg', 'link' => ['url' => 'https://www.zibll.com/', 'target' => '_blank'], 'text' => ['title' => '', 'desc' => ''], 'text_align' => 'left-bottom', 'text_parallax' => 30, 'text_size_m' => 20, 'text_size_pc' => 30], ['background' => $img . 'user_t.jpg', 'link' => ['url' => 'https://www.zibll.com/', 'target' => '_blank'], 'text' => ['title' => '', 'desc' => ''], 'text_align' => 'left-bottom', 'text_parallax' => 30, 'text_size_m' => 20, 'text_size_pc' => 30]]; }
|
||||
private static function header_slider_defaults(): array { $img = self::asset('assets/img/'); return [['background' => $img . 'slider-bg.jpg', 'link' => ['url' => home_url('/'), 'target' => '_blank'], 'text' => ['title' => '', 'desc' => ''], 'text_align' => 'left-bottom', 'text_parallax' => 30, 'text_size_m' => 20, 'text_size_pc' => 30], ['background' => $img . 'user_t.jpg', 'link' => ['url' => home_url('/'), 'target' => '_blank'], 'text' => ['title' => '', 'desc' => ''], 'text_align' => 'left-bottom', 'text_parallax' => 30, 'text_size_m' => 20, 'text_size_pc' => 30]]; }
|
||||
private static function slider_options_defaults(): array { return ['direction' => 'horizontal', 'loop' => true, 'button' => true, 'pagination' => true, 'effect' => 'slide', 'scale_height' => false, 'auto_height' => false, 'pc_height' => 550, 'm_height' => 280, 'spacebetween' => 0, 'speed' => 0, 'autoplay' => true, 'interval' => 6]; }
|
||||
private static function search_defaults(): array { return ['show_keywords' => true, 'popular_limit' => 6, 'show_input_cat' => false, 'in_cat' => '', 'more_cats' => '', 'show_type' => false, 'in_type' => 'post', 'before_html' => '<div class="em16 font-bold mb10">更优雅的Wordpress主题</div>' . "\n" . '<div>这是导航栏幻灯片多功能组件,可在后台进行配置</div>', 'after_html' => '']; }
|
||||
private static function card_defaults(): array { return ['icon_radius4' => false, 'cards' => [['icon' => 'fa fas fa-gem', 'customize_icon' => '', 'icon_class' => 'c-yellow', 'link' => [], 'title' => '图标卡片', 'desc' => '这是一个图标卡片示例'], ['icon' => 'fa fas fa-star', 'customize_icon' => '', 'icon_class' => 'c-blue-2', 'link' => [], 'title' => '原创作品', 'desc' => '这是一个图标卡片示例'], ['icon' => 'fa fas fa-fire', 'customize_icon' => '', 'icon_class' => 'jb-pink', 'link' => [], 'title' => '灵感来源<badge class="ml6 jb-yellow">NEW</badge>', 'desc' => '这是一个图标卡片示例'], ['icon' => 'fa fas fa-wrench', 'customize_icon' => '', 'icon_class' => 'jb-cyan', 'link' => [], 'title' => '系统工具 <badge class="ml6 jb-blue">GO <span class="fa fa-angle-right em12"></span></badge>', 'desc' => '这是一个图标卡片示例']]]; }
|
||||
@@ -201,11 +201,11 @@ class SchemaPageDisplay {
|
||||
private static function options(array $options): array { $out = []; foreach ($options as $value => $label) { $out[] = ['label' => $label, 'value' => (string) $value]; } return $out; }
|
||||
private static function device_options(): array { return self::options(['pc_s' => 'PC端显示', 'm_s' => '移动端显示']); }
|
||||
private static function solid_palette(): array { return self::options(['ff648f' => '#ff648f', 'c246f5' => '#c246f5', '469cf5' => '#469cf5', '27bf41' => '#27bf41', 'fd6b4e' => '#fd6b4e', '2d2422' => '#2d2422']); }
|
||||
private static function zib_palette(bool $transparent = false): array { $colors = $transparent ? ['transparent' => 'rgba(114,114,114,.1)'] : []; $colors += ['c-red' => 'rgba(255,84,115,.4)', 'c-yellow' => 'rgba(255,111,6,.4)', 'c-cyan' => 'rgba(8,196,193,.4)', 'c-blue' => 'rgba(41,151,247,.4)', 'c-blue-2' => 'rgba(77,130,249,.4)', 'c-green' => 'rgba(18,185,40,.4)', 'c-purple' => 'rgba(213,72,245,.4)', 'jb-red' => '#ff5473', 'jb-yellow' => '#ff8a00', 'jb-cyan' => '#08c4c1', 'jb-blue' => '#2997f7', 'jb-green' => '#12b928', 'jb-purple' => '#d548f5', 'jb-pink' => '#ff648f']; return self::options($colors); }
|
||||
private static function aksrt_palette(bool $transparent = false): array { $colors = $transparent ? ['transparent' => 'rgba(114,114,114,.1)'] : []; $colors += ['c-red' => 'rgba(255,84,115,.4)', 'c-yellow' => 'rgba(255,111,6,.4)', 'c-cyan' => 'rgba(8,196,193,.4)', 'c-blue' => 'rgba(41,151,247,.4)', 'c-blue-2' => 'rgba(77,130,249,.4)', 'c-green' => 'rgba(18,185,40,.4)', 'c-purple' => 'rgba(213,72,245,.4)', 'jb-red' => '#ff5473', 'jb-yellow' => '#ff8a00', 'jb-cyan' => '#08c4c1', 'jb-blue' => '#2997f7', 'jb-green' => '#12b928', 'jb-purple' => '#d548f5', 'jb-pink' => '#ff648f']; return self::options($colors); }
|
||||
private static function post_order_options(bool $with_default): array { $options = $with_default ? ['' => '保持默认'] : []; $options += ['modified' => '更新', 'date' => '发布', 'views' => '浏览', 'like' => '点赞', 'comment_count' => '评论', 'favorite' => '收藏', 'rand' => '随机']; return self::options($options); }
|
||||
private static function header_layout_options(): array { $base = self::asset('assets/images/header-layout/'); return [['label' => '布局一', 'value' => '1', 'image' => $base . 'header_layout_1.png'], ['label' => '布局二', 'value' => '2', 'image' => $base . 'header_layout_2.png'], ['label' => '布局三', 'value' => '3', 'image' => $base . 'header_layout_3.png']]; }
|
||||
private static function mobile_header_layout_options(): array { $base = self::asset('assets/images/header-layout/'); return [['label' => '居中', 'value' => 'center', 'image' => $base . 'mobile_header_layout_center.png'], ['label' => '居左', 'value' => 'left', 'image' => $base . 'mobile_header_layout_left.png']]; }
|
||||
private static function text_align_options(): array { $base = self::asset('assets/images/slider-align/'); return [['label' => '左下', 'value' => 'left-bottom', 'image' => $base . 'left-bottom.jpg'], ['label' => '左中', 'value' => 'left-conter', 'image' => $base . 'left-conter.jpg'], ['label' => '居中', 'value' => 'conter-conter', 'image' => $base . 'conter-conter.jpg'], ['label' => '中下', 'value' => 'conter-bottom', 'image' => $base . 'conter-bottom.jpg'], ['label' => '右中', 'value' => 'right-conter', 'image' => $base . 'right-conter.jpg'], ['label' => '右下', 'value' => 'right-bottom', 'image' => $base . 'right-bottom.jpg']]; }
|
||||
private static function asset(string $path): string { return trailingslashit(get_template_directory_uri()) . ltrim($path, '/'); }
|
||||
private static function copyright_default(): string { return sprintf('Copyright © %s · <a href="%s">%s</a> · 由<a target="_blank" href="https://www.zibll.com">zibll主题</a>强力驱动.', date('Y'), home_url(), get_bloginfo('title')); }
|
||||
private static function copyright_default(): string { return sprintf('Copyright © %s · <a href="%s">%s</a>', date('Y'), home_url(), get_bloginfo('title')); }
|
||||
}
|
||||
@@ -545,8 +545,8 @@ class SchemaUsers {
|
||||
['key' => 'points_transfer_min', 'label' => '最低转账金额', 'type' => 'number', 'default' => 1, 'min' => 1, 'max' => 9999],
|
||||
]],
|
||||
['key' => 'deduction', 'title' => '积分抵扣(预留)', 'fields' => [
|
||||
['key' => 'points_deduction_s', 'label' => '启用积分抵扣', 'type' => 'switch', 'default' => false, 'help' => '对齐 zibll:运行时暂未启用。字段保留供后续接收银台现金单抵扣。'],
|
||||
['key' => 'points_deduction_rate', 'label' => '积分换算比例', 'type' => 'number', 'default' => 100, 'min' => 1, 'max' => 10000, 'help' => '多少积分抵 1 元(zibll points_deduction_rate)。当前未参与下单。'],
|
||||
['key' => 'points_deduction_s', 'label' => '启用积分抵扣', 'type' => 'switch', 'default' => false, 'help' => '对齐 legacy:运行时暂未启用。字段保留供后续接收银台现金单抵扣。'],
|
||||
['key' => 'points_deduction_rate', 'label' => '积分换算比例', 'type' => 'number', 'default' => 100, 'min' => 1, 'max' => 10000, 'help' => '多少积分抵 1 元(legacy points_deduction_rate)。当前未参与下单。'],
|
||||
['key' => 'points_deduction_max', 'label' => '最大抵扣比例(%)', 'type' => 'number', 'default' => 50, 'min' => 1, 'max' => 100, 'help' => '预留:最多可抵订单金额百分比。当前未参与下单。'],
|
||||
]],
|
||||
['key' => 'card_pass', 'title' => '积分卡密兑换', 'fields' => [
|
||||
|
||||
Reference in new issue
Block a user