feat(navigation): hard-switch to Zibll navigation and Font Awesome 5

This commit is contained in:
2026-08-18 20:46:21 +08:00
parent 3c3ddac8be
commit a0b84977a2
630 changed files with 101647 additions and 11293 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
* @package AKSRT
* @since 5.0.0
*
* @var string $icon FA icon class (default: far fa-inbox)
* @var string $icon FA icon class (default: fa fas fa-inbox)
* @var string $title 主标题
* @var string $desc 描述文字
* @var string $action_url 操作按钮链接
@@ -17,7 +17,7 @@
defined('ABSPATH') || exit;
$icon = $args['icon'] ?? 'far fa-inbox';
$icon = $args['icon'] ?? 'fa fas fa-inbox';
$title = $args['title'] ?? __('暂无内容', 'aksrt');
$desc = $args['desc'] ?? '';
$action_url = $args['action_url'] ?? '';
@@ -35,7 +35,7 @@ $time_diff = human_time_diff(strtotime($comment->comment_date), current_time(
</a>
<div class="profile-comment-item__meta">
<span class="profile-comment-item__meta-item profile-comment-item__meta-item--post">
<i class="far fa-file-alt" aria-hidden="true"></i>
<i class="fa fas fa-file-alt" aria-hidden="true"></i>
<?php esc_html_e('在', 'aksrt'); ?>
<a href="<?php echo esc_url($post_link); ?>" class="profile-comment-item__post-link"><?php echo esc_html($post_title); ?></a>
</span>
@@ -56,7 +56,7 @@ $tags = get_the_tags() ?: [];
<div class="profile-list-item__meta">
<?php foreach ($categories as $cat) : ?>
<a href="<?php echo esc_url(get_category_link($cat->term_id)); ?>" class="profile-list-item__chip profile-list-item__chip--category">
<i class="fas fa-folder" aria-hidden="true"></i>
<i class="fa fas fa-folder" aria-hidden="true"></i>
<span><?php echo esc_html($cat->name); ?></span>
</a>
<?php endforeach; ?>
+2 -2
View File
@@ -47,7 +47,7 @@ if (!$prev_page && !$next_page) return;
<?php if ($prev_page) : ?>
<a href="<?php echo esc_url(get_permalink($prev_page->ID)); ?>" class="aksrt-doc-chapter-nav__prev">
<span class="aksrt-doc-chapter-nav__label">
<i class="fas fa-arrow-left"></i>
<i class="fa fas fa-arrow-left"></i>
<?php esc_html_e('上一篇', 'aksrt'); ?>
</span>
<span class="aksrt-doc-chapter-nav__title"><?php echo esc_html($prev_page->post_title); ?></span>
@@ -60,7 +60,7 @@ if (!$prev_page && !$next_page) return;
<a href="<?php echo esc_url(get_permalink($next_page->ID)); ?>" class="aksrt-doc-chapter-nav__next">
<span class="aksrt-doc-chapter-nav__label">
<?php esc_html_e('下一篇', 'aksrt'); ?>
<i class="fas fa-arrow-right"></i>
<i class="fa fas fa-arrow-right"></i>
</span>
<span class="aksrt-doc-chapter-nav__title"><?php echo esc_html($next_page->post_title); ?></span>
</a>
+4 -4
View File
@@ -28,7 +28,7 @@ $excerpt = wp_trim_words(get_the_excerpt(), 30, '...');
</div>
<?php else : ?>
<div class="aksrt-doc-index-card__icon">
<i class="fas fa-book-open"></i>
<i class="fa fas fa-book"></i>
</div>
<?php endif; ?>
@@ -40,16 +40,16 @@ $excerpt = wp_trim_words(get_the_excerpt(), 30, '...');
<div class="aksrt-doc-index-card__meta">
<?php if ($child_count > 0) : ?>
<span class="aksrt-doc-index-card__count">
<i class="fas fa-file-alt"></i>
<i class="fa fas fa-file-alt"></i>
<?php printf(esc_html__('%d 篇文章', 'aksrt'), $child_count); ?>
</span>
<?php endif; ?>
<span class="aksrt-doc-index-card__date">
<i class="fas fa-clock"></i>
<i class="fa fas fa-clock"></i>
<?php echo esc_html(get_the_date('', $page_id)); ?>
</span>
</div>
</div>
<i class="fas fa-chevron-right aksrt-doc-index-card__arrow"></i>
<i class="fa fas fa-chevron-right aksrt-doc-index-card__arrow"></i>
</a>
+3 -3
View File
@@ -33,14 +33,14 @@ $root_page = get_post($root_id);
<aside class="aksrt-doc-sidebar" role="navigation" aria-label="<?php esc_attr_e('文档导航', 'aksrt'); ?>">
<div class="aksrt-doc-sidebar__header">
<a href="<?php echo esc_url(get_permalink($root_id)); ?>" class="aksrt-doc-sidebar__root">
<i class="fas fa-book aksrt-doc-sidebar__root-icon"></i>
<i class="fa fas fa-book aksrt-doc-sidebar__root-icon"></i>
<span><?php echo esc_html($root_page->post_title ?? __('文档', 'aksrt')); ?></span>
</a>
</div>
<div class="aksrt-doc-sidebar__search">
<input type="text" class="aksrt-doc-sidebar__search-input" placeholder="<?php esc_attr_e('搜索文档...', 'aksrt'); ?>" aria-label="<?php esc_attr_e('搜索文档', 'aksrt'); ?>">
<i class="fas fa-search aksrt-doc-sidebar__search-icon"></i>
<i class="fa fas fa-search aksrt-doc-sidebar__search-icon"></i>
</div>
<?php if (!empty($doc_pages)) : ?>
@@ -67,7 +67,7 @@ $root_page = get_post($root_id);
<li class="<?php echo esc_attr($li_class); ?>" style="<?php echo $depth > 0 ? 'padding-left:' . ($depth * 16) . 'px;' : ''; ?>">
<a href="<?php echo esc_url(get_permalink($dp->ID)); ?>" class="aksrt-doc-sidebar__link<?php echo $is_current ? ' is-active' : ''; ?>">
<?php if ($has_children) : ?>
<i class="fas fa-chevron-<?php echo $is_open ? 'down' : 'right'; ?> aksrt-doc-sidebar__toggle" aria-hidden="true"></i>
<i class="fa fas fa-chevron-<?php echo $is_open ? 'down' : 'right'; ?> aksrt-doc-sidebar__toggle" aria-hidden="true"></i>
<?php endif; ?>
<span><?php echo esc_html($dp->post_title); ?></span>
</a>
@@ -71,7 +71,7 @@ $state_icons = [
'owned' => ['icon' => 'fa-download', 'color' => 'success'],
'not_logged_in' => ['icon' => 'fa-lock', 'color' => 'warning'],
'need_purchase' => ['icon' => 'fa-shopping-cart', 'color' => 'warning'],
'need_vip' => ['icon' => 'fa-crown', 'color' => 'warning'],
'need_vip' => ['icon' => 'fa-certificate', 'color' => 'warning'],
'no_permission' => ['icon' => 'fa-ban', 'color' => 'warning'],
'pending_delivery' => ['icon' => 'fa-clock', 'color' => 'info'],
];
@@ -79,13 +79,13 @@ $state_info = $state_icons[$status] ?? $state_icons['available'];
?>
<div class="download-permission-card download-permission-card--<?php echo esc_attr($status); ?>">
<div class="download-permission-card__status download-permission-card__status--<?php echo esc_attr($state_info['color']); ?>">
<i class="fas <?php echo esc_attr($state_info['icon']); ?>" aria-hidden="true"></i>
<i class="fa <?php echo esc_attr($state_info['icon']); ?>" aria-hidden="true"></i>
<span><?php echo esc_html($status_text !== '' ? $status_text : __('可下载', 'aksrt')); ?></span>
</div>
<?php if ($need_purchase && $amount > 0) : ?>
<div class="download-permission-card__cost">
<i class="fas fa-tag" aria-hidden="true"></i>
<i class="fa fas fa-tag" aria-hidden="true"></i>
<span>
<?php
if ($pay_modo === 'points') {
@@ -20,7 +20,7 @@ if (class_exists('\AKSRT\Settings\Settings') && !\AKSRT\Settings\Settings::homep
return;
}
$banners = function_exists('aksrt_get_banners') ? aksrt_get_banners(8, 'banner') : [];
$banners = function_exists('aksrt_get_banners') ? aksrt_get_banners(8) : [];
if (empty($banners)) {
if (current_user_can('manage_options')) {
echo '<div class="home-module home-module--banner home-module--banner-empty box-body">';
@@ -48,7 +48,7 @@ $more_link = $cat_id > 0 ? get_category_link($cat_id) : '';
<h2 class="home-module__title"><?php echo esc_html($display_title ?: __('精选内容', 'aksrt')); ?></h2>
<?php if ($more_link) : ?>
<a class="home-module__more" href="<?php echo esc_url($more_link); ?>">
<?php esc_html_e('查看更多', 'aksrt'); ?> <i class="fas fa-arrow-right" aria-hidden="true"></i>
<?php esc_html_e('查看更多', 'aksrt'); ?> <i class="fa fas fa-arrow-right" aria-hidden="true"></i>
</a>
<?php endif; ?>
</header>
@@ -1,494 +0,0 @@
<?php
/**
* Home module: header components hero + floating search + icon cards.
*
* DOM mirrors zibll header-slider:
* container > slider | search overlay (before + form + after) | cards
*
* @package AKSRT
* @version 4.2.0
*/
defined('ABSPATH') || exit;
// Visibility (page type + device) is decided by aksrt_header_slide_is_show().
// This partial only renders content when already gated by aksrt_header_slide().
$cfg = get_query_var('aksrt_module_config', []);
if (!is_array($cfg)) {
$cfg = [];
}
$hero_banners = function_exists('aksrt_get_banners') ? aksrt_get_banners(8, 'hero') : [];
$settings = function_exists('aksrt_get_all_settings') ? aksrt_get_all_settings() : [];
$search_cfg = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_header_components_search_config() : [
'pc' => false,
'mobile' => false,
'show' => false,
'show_keywords' => false,
'popular_limit' => 6,
'show_input_cat' => false,
'show_type' => false,
'in_cat' => '',
'in_type' => 'post',
'more_cats' => [],
'before_html' => '',
'after_html' => '',
];
// zibll zib_m_pc_is_show: checkbox arrays with pc_s / m_s.
$is_mobile_req = function_exists('wp_is_mobile') && wp_is_mobile();
$m_pc_show = static function ($opt) use ($is_mobile_req): bool {
$opt = (array) $opt;
return ($is_mobile_req && in_array('m_s', $opt, true)) || (!$is_mobile_req && in_array('pc_s', $opt, true));
};
// Search device gate (zibll header_slider_search_s).
$search_opt = [];
if (!empty($search_cfg['pc'])) {
$search_opt[] = 'pc_s';
}
if (!empty($search_cfg['mobile'])) {
$search_opt[] = 'm_s';
}
// Fallback: master enabled without explicit devices = both (legacy).
if (!$search_opt && !empty($search_cfg['show'])) {
$search_opt = ['pc_s', 'm_s'];
}
$show_search = $m_pc_show($search_opt) || !empty($cfg['with_search']);
// Cards device gate (zibll header_slider_card_s).
$cards_master = !empty($settings['header_components_cards_enabled']);
$card_show_devices = isset($settings['header_components_card_show_devices'])
? (array) $settings['header_components_card_show_devices']
: ['pc', 'mobile'];
$card_opt = [];
if (in_array('pc', $card_show_devices, true)) {
$card_opt[] = 'pc_s';
}
if (in_array('mobile', $card_show_devices, true)) {
$card_opt[] = 'm_s';
}
if (!$card_opt && $cards_master) {
$card_opt = ['pc_s', 'm_s'];
}
$show_cards = $cards_master && $m_pc_show($card_opt);
$icon_cards = isset($settings['header_components_icon_cards']) ? (array) $settings['header_components_icon_cards'] : [];
$card_bg_mode = !empty($settings['header_components_card_shared_bg']) ? 'shared' : 'individual';
$card_icon_shape = $settings['header_components_card_icon_shape'] ?? 'circle';
// Filter blur (zibll header_slider_filter_blur) — independent of cards.
$filter_blur_devices = isset($settings['header_components_filter_blur_devices'])
? (array) $settings['header_components_filter_blur_devices']
: [];
// Legacy: header_components_card_blur true without devices → both.
if (!$filter_blur_devices && !empty($settings['header_components_card_blur'])) {
$filter_blur_devices = ['pc', 'mobile'];
}
$filter_opt = [];
if (in_array('pc', $filter_blur_devices, true)) {
$filter_opt[] = 'pc_s';
}
if (in_array('mobile', $filter_blur_devices, true)) {
$filter_opt[] = 'm_s';
}
$filter_blur_on = $m_pc_show($filter_opt);
$slide_count = count($hero_banners);
// card-N only counts cards actually rendered on this device (zibll parity).
$visible_card_count = 0;
if ($show_cards) {
foreach ($icon_cards as $_c) {
if (is_array($_c) && (trim((string) ($_c['icon'] ?? '')) !== '' || trim((string) ($_c['custom_icon'] ?? '')) !== '' || trim((string) ($_c['customize_icon'] ?? '')) !== '')) {
$visible_card_count++;
} elseif (is_array($_c) && trim((string) ($_c['title'] ?? '')) !== '') {
// Count entries even if icon missing so layout still allocates.
$visible_card_count++;
}
}
}
$container_classes = ['header-slider-container', 'header-components-container', 'relative', 'mb20', 'card-' . $visible_card_count];
if ($filter_blur_on) {
$container_classes[] = 'filter-blur';
}
if (in_array('pc', $filter_blur_devices, true)) {
$container_classes[] = 'has-blur-pc';
}
if (in_array('mobile', $filter_blur_devices, true)) {
$container_classes[] = 'has-blur-mobile';
}
/**
* Search overlay = zibll .header-slider-search.abs-center
* Uses aksrt_get_search_box() (zib_get_search_box parity) for form / keywords / type / cat.
* Title/subtitle live in before_html (same flow stack as the form).
*/
$render_hero_search = static function () use ($search_cfg, $is_mobile_req): void {
$_before = isset($search_cfg['before_html']) ? (string) $search_cfg['before_html'] : '';
$_after = isset($search_cfg['after_html']) ? (string) $search_cfg['after_html'] : '';
$search_args = [
'class' => '',
'show_keywords' => !empty($search_cfg['show_keywords']),
'popular_limit' => max(0, (int) ($search_cfg['popular_limit'] ?? 6)),
'show_history' => false,
'show_posts' => false,
'show_input_cat' => !empty($search_cfg['show_input_cat']),
'more_cats' => !empty($search_cfg['more_cats']) ? (array) $search_cfg['more_cats'] : [],
'in_cat' => (string) ($search_cfg['in_cat'] ?? ''),
'show_type' => !empty($search_cfg['show_type']),
'in_type' => (string) ($search_cfg['in_type'] ?? 'post'),
'in_user' => '',
's' => is_search() ? (string) get_search_query() : '',
];
// Mobile: never show hot keywords (zibll).
if ($is_mobile_req) {
$search_args['show_keywords'] = false;
}
$search_html = function_exists('aksrt_get_search_box')
? (string) aksrt_get_search_box($search_args)
: '';
$before_html = trim($_before) !== ''
? '<div class="header-slider-search-more text-center before">' . wp_kses_post($_before) . '</div>'
: '';
$after_html = trim($_after) !== ''
? '<div class="header-slider-search-more after">' . wp_kses_post($_after) . '</div>'
: '';
echo '<div class="header-slider-search header-components-search abs-center">'
. $before_html
. $search_html
. $after_html
. '</div>';
};
$render_icon_cards = static function () use ($show_cards, $icon_cards, $card_bg_mode, $card_icon_shape): void {
if (!$show_cards || empty($icon_cards)) {
return;
}
/**
* Overlay icon cards — 1:1 zibll zib_header_slide() card module.
*
* show_widget_bg (shared) → outer .zib-widget.padding-10 + each card class=padding-10 in .relative-h
* individual (default) → outer empty div + each card class=zib-widget in .flex1
* Row: .flex.jse.flex-row.gutters-5.flex-col-sm-2
*/
$show_widget_bg = ($card_bg_mode === 'shared');
$icon_radius4 = ($card_icon_shape === 'square');
$slider_card_html = '';
foreach ($icon_cards as $raw) {
if (!is_array($raw)) {
continue;
}
$card = $raw;
$card['class'] = $show_widget_bg ? 'padding-10' : 'zib-widget';
$extra = trim((string) ($card['icon_class'] ?? ''));
if ($icon_radius4 && !str_contains($extra, 'radius4')) {
$extra = trim($extra . ' radius4');
}
$card['icon_class'] = $extra;
unset($card['icon_shape']);
$wrap_class = $show_widget_bg ? 'relative-h' : 'flex1';
$inner = function_exists('aksrt_icon_cover_card')
? aksrt_icon_cover_card($card)
: (function_exists('aksrt_render_icon_cover_card') ? aksrt_render_icon_cover_card($card) : '');
if ($inner === '') {
continue;
}
$slider_card_html .= '<div class="' . esc_attr($wrap_class) . '">' . $inner . '</div>';
}
if ($slider_card_html === '') {
return;
}
?>
<div class="header-slider-card header-components-card container">
<?php if ($show_widget_bg) : ?>
<div class="zib-widget padding-10">
<?php else : ?>
<div class="">
<?php endif; ?>
<div class="flex jse flex-row gutters-5 flex-col-sm-2">
<?php echo $slider_card_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
</div>
</div>
<?php
};
if (!empty($hero_banners)) :
$slider_cfg = function_exists('aksrt_get_slider_config') ? aksrt_get_slider_config() : [];
$_nav_color_for_header = sanitize_hex_color((string) ($slider_cfg['nav_color'] ?? '')) ?: '';
if ($_nav_color_for_header !== '' && strtolower($_nav_color_for_header) !== '#ffffff') {
echo '<style id="aksrt-header-slider-nav-color">body.nav-fixed:not(.body-scroll):not(.mobile-navbar-show) .header.show-slide{--header-color:' . esc_attr($_nav_color_for_header) . ';}</style>';
}
// zibll zib_new_slider defaults for header_slider_option.
$direction = in_array(($slider_cfg['direction'] ?? 'horizontal'), ['horizontal', 'vertical'], true) ? $slider_cfg['direction'] : 'horizontal';
$effect = sanitize_key((string) ($slider_cfg['effect'] ?? 'slide')) ?: 'slide';
$loop_on = $slide_count > 1 && (!isset($slider_cfg['loop']) || !empty($slider_cfg['loop']));
$button_on = $slide_count > 1 && (!isset($slider_cfg['button']) || !empty($slider_cfg['button']) || !empty($slider_cfg['navigation']));
$pag_on = $slide_count > 1 && (!isset($slider_cfg['pagination']) || !empty($slider_cfg['pagination']));
$autoplay_on = $slide_count > 1 && (!isset($slider_cfg['autoplay']) || !empty($slider_cfg['autoplay']) || !empty($slider_cfg['autoplay_interval']));
$interval_ms = max(1000, min(30000, (int) ($slider_cfg['autoplay_interval'] ?? 4000)));
// zibll stores interval in seconds sometimes (<999).
if ($interval_ms < 999) {
$interval_ms *= 1000;
}
$speed_ms = max(0, (int) ($slider_cfg['speed'] ?? 0));
$space_between = max(0, (int) ($slider_cfg['space_between'] ?? 0));
$scale_height = !empty($slider_cfg['scale_height']);
$scale_pct = max(10, min(100, (int) ($slider_cfg['scale'] ?? 40)));
// Heights: demo uses style="--m-height :300px;--pc-height :560px;" on .new-swiper
$pc_h = trim((string) ($slider_cfg['pc_height'] ?? ''));
$m_h = trim((string) ($slider_cfg['mobile_height'] ?? ''));
// Defaults match zibll header_slider_option (550 / 280).
if ($pc_h === '') {
$pc_h = '550';
}
if ($m_h === '') {
$m_h = '280';
}
// Normalize to unitless px numbers for CSS vars.
$pc_h_num = (int) preg_replace('/[^0-9]/', '', $pc_h) ?: 550;
$m_h_num = (int) preg_replace('/[^0-9]/', '', $m_h) ?: 280;
$swiper_class = 'swiper new-swiper slide-index slide-header';
if ($scale_height && $direction !== 'vertical') {
$swiper_class .= ' scale-height';
}
if ($slide_count === 1) {
$swiper_class .= ' swiper-container-initialized';
}
$style_vars = '';
if ($scale_height && $direction !== 'vertical') {
$style_vars = '--scale-height :' . $scale_pct . '%';
} else {
$style_vars = '--m-height :' . $m_h_num . 'px;--pc-height :' . $pc_h_num . 'px;';
}
// data-* attrs for zibll main.js / our slider.js dual path.
$data_attrs = ' data-direction="' . esc_attr($direction) . '"';
$data_attrs .= ' data-effect="' . esc_attr($effect) . '"';
$data_attrs .= $loop_on ? ' data-loop="true"' : '';
$data_attrs .= $autoplay_on ? ' data-autoplay="1" data-interval="' . esc_attr((string) $interval_ms) . '"' : '';
$data_attrs .= $speed_ms > 299 ? ' data-speed="' . esc_attr((string) $speed_ms) . '"' : '';
$data_attrs .= ' data-spaceBetween="' . esc_attr((string) $space_between) . '"';
$swiper_config = [
'effect' => $effect,
'direction' => $direction,
'loop' => $loop_on,
'speed' => $speed_ms > 299 ? $speed_ms : 600,
'spaceBetween' => $space_between,
'autoplay' => $autoplay_on ? ['delay' => $interval_ms, 'disableOnInteraction' => false] : false,
'keyboard' => ['enabled' => true],
'autoHeight' => false,
];
if ($pag_on) {
$swiper_config['pagination'] = ['clickable' => true];
} else {
$swiper_config['pagination'] = false;
}
if ($button_on) {
$swiper_config['navigation'] = true;
} else {
$swiper_config['navigation'] = false;
}
?>
<div class="<?php echo esc_attr(implode(' ', $container_classes)); ?>" id="aksrt-header-components">
<div class="relative zib-slider">
<div class="<?php echo esc_attr($swiper_class); ?>"<?php echo $data_attrs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> data-swiper-config="<?php echo esc_attr(wp_json_encode($swiper_config)); ?>" style="<?php echo esc_attr($style_vars); ?>">
<div class="swiper-wrapper">
<?php foreach ($hero_banners as $index => $slide) :
$is_mobile_now = function_exists('wp_is_mobile') && wp_is_mobile();
$device_vis = (string) ($slide['device_visibility'] ?? ($slide['hide'] ?? 'all'));
// zibll hide / device_visibility: skip when current device is hidden.
if (in_array($device_vis, ['pc', 'only_pc'], true) && $is_mobile_now) {
continue;
}
if (in_array($device_vis, ['m', 'mobile', 'only_sm', 'm-only'], true) && !$is_mobile_now) {
continue;
}
$slide_classes = 'swiper-slide';
$video_url = (string) ($slide['video_url'] ?? $slide['background_video'] ?? '');
$image_url = (string) ($slide['image'] ?? $slide['background'] ?? '');
// Link may be string or zibll link array.
$link_raw = $slide['link'] ?? '';
$link_url = '';
$link_target = '';
if (is_array($link_raw)) {
$link_url = (string) ($link_raw['url'] ?? '');
$link_target = (string) ($link_raw['target'] ?? '');
} else {
$link_url = (string) $link_raw;
$link_target = (string) ($slide['link_target'] ?? '');
}
$blank = ($link_target === '_blank' || $link_target === '1') ? ' target="_blank"' : '';
// Video bg only on desktop (zibll).
$use_video = ($video_url !== '' && !$is_mobile_now);
if ($use_video) {
$slide_classes .= ' slide-background-video';
}
$img_alt = (string) ($slide['title'] ?? '');
if ($img_alt === '') {
$img_alt = get_bloginfo('name');
}
// Decorative text from slide (optional; main copy is search before_html).
$show_text = !isset($slide['show_text']) || $slide['show_text'];
$title = (string) ($slide['title'] ?? ($slide['text']['title'] ?? ''));
$desc = (string) ($slide['subtitle'] ?? $slide['description'] ?? ($slide['text']['desc'] ?? ''));
if (is_array($slide['text'] ?? null)) {
$title = (string) ($slide['text']['title'] ?? $title);
$desc = (string) ($slide['text']['desc'] ?? $desc);
}
$text_align = (string) ($slide['text_align'] ?? ($slide['text']['text_align'] ?? 'left-bottom'));
$text_size_pc = (int) ($slide['text_size_pc'] ?? ($slide['text']['text_size_pc'] ?? 0));
$text_size_m = (int) ($slide['text_size_m'] ?? ($slide['text']['text_size_m'] ?? 0));
$text_parallax = (int) ($slide['text_parallax'] ?? ($slide['text']['parallax'] ?? 0));
$s_text = '';
if ($show_text && ($title !== '' || $desc !== '')) {
$s_text = $title !== '' ? '<div class="slide-title">' . esc_html($title) . '</div>' : '';
$s_text .= $desc !== '' ? '<div class="slide-desc">' . esc_html($desc) . '</div>' : '';
$s_text_class = 'abs-center slide-text';
if ($text_align !== '') {
$s_text_class .= ' ' . sanitize_html_class($text_align);
}
$s_text_style = '';
if ($text_size_pc > 0) {
$s_text_style .= '--text-size-pc:' . $text_size_pc . 'px;';
}
if ($text_size_m > 0) {
$s_text_style .= '--text-size-m:' . $text_size_m . 'px;';
}
$s_text = '<div class="' . esc_attr($s_text_class) . '"' . ($s_text_style !== '' ? ' style="' . esc_attr($s_text_style) . '"' : '') . '>' . $s_text . '</div>';
if ($text_parallax) {
$s_text = '<div class="absolute" data-swiper-parallax="' . esc_attr((string) $text_parallax) . '">' . $s_text . '</div>';
}
}
// Background media (zibll order: video > image).
$s_background = '';
if ($use_video) {
if (aksrt_is_lazy('lazy_sider')) {
$poster = $image_url !== '' ? ' data-poster="' . esc_url($image_url) . '"' : '';
$video_src = ' class="fit-cover radius8 lazyload" src="" data-src="' . esc_url($video_url) . '"';
} else {
$poster = $image_url !== '' ? ' poster="' . esc_url($image_url) . '"' : '';
$video_src = ' class="fit-cover radius8" src="' . esc_url($video_url) . '"';
}
$s_background = '<video autoplay loop muted playsinline' . $video_src . $poster . '></video><div class="absolute"></div>';
} elseif ($image_url !== '') {
$s_background = '<img' . aksrt_get_lazy_attr('lazy_sider', $image_url, 'fit-cover radius8', aksrt_get_lazy_thumb('lg')) . ' alt="' . esc_attr($img_alt) . '">';
} else {
continue;
}
// Layers (image_layer).
$s_layers = '';
$layers = $slide['layers'] ?? ($slide['image_layer'] ?? []);
if (is_array($layers)) {
foreach ($layers as $layer) {
if (!is_array($layer)) {
continue;
}
$layer_image = (string) ($layer['image'] ?? '');
if ($layer_image === '') {
continue;
}
$layer_img = '<img' . aksrt_get_lazy_attr('lazy_sider', $layer_image, 'radius8', aksrt_get_lazy_thumb('lg')) . ' alt="' . esc_attr($img_alt) . '">';
$layer_parallax = isset($layer['parallax']) ? (int) $layer['parallax'] : 0;
$layer_attr = $layer_parallax ? ' data-swiper-parallax="' . $layer_parallax . '%"' : '';
$layer_class = !empty($layer['free_size']) ? ' slide-layer' : '';
if (!empty($layer['align'])) {
$layer_class .= ' text-' . sanitize_html_class((string) $layer['align']);
}
$s_layers .= '<div class="absolute' . esc_attr($layer_class) . '"' . $layer_attr . '>' . $layer_img . '</div>';
}
}
?>
<div class="<?php echo esc_attr($slide_classes); ?>">
<?php if ($link_url !== '') : ?>
<a<?php echo $blank; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> href="<?php echo esc_url($link_url); ?>">
<?php else : ?>
<span>
<?php endif; ?>
<?php echo $s_background; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $s_layers; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $s_text; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php if ($link_url !== '') : ?>
</a>
<?php else : ?>
</span>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<?php if ($button_on) : ?>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<?php endif; ?>
<?php if ($pag_on) : ?>
<div class="swiper-pagination kaoyou"></div>
<?php endif; ?>
</div>
</div>
<?php if ($show_search) : ?>
<?php $render_hero_search(); ?>
<?php endif; ?>
<?php $render_icon_cards(); ?>
<?php if (function_exists('aksrt_render_admin_quick_link')) : ?>
<div class="home-module__admin-tools">
<?php aksrt_render_admin_quick_link('page-display/hero', __('Hero 轮播管理', 'aksrt')); ?>
<?php aksrt_render_admin_quick_link('page-display/header-components', __('顶部多功能组件', 'aksrt')); ?>
</div>
<?php endif; ?>
</div>
<?php else : ?>
<?php
$is_admin_user = current_user_can('manage_options');
?>
<div class="<?php echo esc_attr(implode(' ', $container_classes)); ?>" id="aksrt-header-components">
<div class="header-components slide-header header-components--gradient">
<?php if (!$show_search) : ?>
<div class="abs-center slide-text header-components__content text-center conter-conter">
<div class="header-components__title slide-title"><?php bloginfo('name'); ?></div>
<div class="header-components__subtitle slide-desc"><?php echo esc_html(get_bloginfo('description', 'display')); ?></div>
<?php if ($is_admin_user) : ?>
<p class="header-components__admin-hint" role="note">
<?php esc_html_e('No Hero slides found. Showing fallback site info.', 'aksrt'); ?>
</p>
<?php endif; ?>
</div>
<?php elseif ($is_admin_user) : ?>
<div class="header-components__admin-hint" role="note" style="position:absolute;bottom:12px;left:50%;transform:translateX(-50%);z-index:3;">
<?php esc_html_e('No Hero slides found. Configure slides or search before_html in admin.', 'aksrt'); ?>
</div>
<?php endif; ?>
</div>
<?php if ($show_search) : ?>
<?php $render_hero_search(); ?>
<?php endif; ?>
<?php $render_icon_cards(); ?>
<?php if (function_exists('aksrt_render_admin_quick_link')) : ?>
<div class="home-module__admin-tools">
<?php aksrt_render_admin_quick_link('page-display/hero', __('Hero 轮播管理', 'aksrt')); ?>
<?php aksrt_render_admin_quick_link('page-display/header-components', __('顶部多功能组件', 'aksrt')); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
@@ -61,7 +61,7 @@ $display_title = $title ?: __('热点推荐', 'aksrt');
<section class="home-module home-module--hotspot hotspot--desktop-only" aria-label="<?php echo esc_attr($display_title); ?>">
<header class="home-module__header">
<h2 class="home-module__title">
<i class="fas fa-fire" aria-hidden="true"></i>
<i class="fa fas fa-fire" aria-hidden="true"></i>
<?php echo esc_html($display_title); ?>
</h2>
</header>
+1 -1
View File
@@ -61,7 +61,7 @@ if (empty($categories)) {
</div>
<?php else : ?>
<div class="home-module__more-cover home-module__more-cover--placeholder">
<i class="fas fa-folder" aria-hidden="true"></i>
<i class="fa fas fa-folder" aria-hidden="true"></i>
</div>
<?php endif; ?>
<div class="home-module__more-body">
@@ -63,7 +63,7 @@ $display_title = $title ?: sprintf(__('%s 排行榜', 'aksrt'), $metric_label);
<section class="home-module home-module--ranking container" aria-label="<?php echo esc_attr($display_title); ?>">
<header class="home-module__header">
<h2 class="home-module__title">
<i class="fas fa-trophy" aria-hidden="true"></i>
<i class="fa fas fa-trophy" aria-hidden="true"></i>
<?php echo esc_html($display_title); ?>
</h2>
</header>
@@ -44,7 +44,7 @@ $archive_link = get_permalink(get_option('page_for_posts'));
<h2 class="home-module__title"><?php echo esc_html($display_title); ?></h2>
<?php if ($archive_link) : ?>
<a class="home-module__more" href="<?php echo esc_url($archive_link); ?>">
<?php esc_html_e('查看更多', 'aksrt'); ?> <i class="fas fa-arrow-right" aria-hidden="true"></i>
<?php esc_html_e('查看更多', 'aksrt'); ?> <i class="fa fas fa-arrow-right" aria-hidden="true"></i>
</a>
<?php endif; ?>
</header>
+1 -1
View File
@@ -74,7 +74,7 @@ if (empty($users)) {
<?php if ($show_stats) : ?>
<span class="home-module__user-stats">
<span class="home-module__user-stat">
<i class="fas fa-file-alt" aria-hidden="true"></i>
<i class="fa fas fa-file-alt" aria-hidden="true"></i>
<?php echo (int) $post_cnt; ?>
</span>
</span>
+3 -3
View File
@@ -23,16 +23,16 @@ $can_register = get_option('users_can_register');
<div class="login-prompt">
<div class="login-prompt__inner">
<div class="login-prompt__icon">
<i class="fas fa-lock"></i>
<i class="fa fas fa-lock"></i>
</div>
<p class="login-prompt__text"><?php echo esc_html($message); ?></p>
<div class="login-prompt__btns">
<a href="<?php echo esc_url($login_url); ?>" class="btn btn-primary btn-sm">
<i class="fas fa-sign-in-alt"></i> <?php esc_html_e('登录', 'aksrt'); ?>
<i class="fa fas fa-sign-in-alt"></i> <?php esc_html_e('登录', 'aksrt'); ?>
</a>
<?php if ($can_register) : ?>
<a href="<?php echo esc_url($register_url); ?>" class="btn btn-outline-primary btn-sm">
<i class="fas fa-user-plus"></i> <?php esc_html_e('注册', 'aksrt'); ?>
<i class="fa fas fa-user-plus"></i> <?php esc_html_e('注册', 'aksrt'); ?>
</a>
<?php endif; ?>
</div>
+6 -6
View File
@@ -64,7 +64,7 @@ $logo_url = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings:
<div class="aksrt-modal-auth__overlay"></div>
<div class="aksrt-modal-auth__card">
<button type="button" class="aksrt-modal-auth__close" aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>">
<i class="fas fa-times"></i>
<i class="fa fas fa-times"></i>
</button>
<div class="aksrt-modal-auth__header modal-colorful-header">
@@ -112,7 +112,7 @@ $logo_url = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings:
<div class="aksrt-modal-auth__pass-wrap">
<input type="password" id="modal-login-pass" name="pwd" autocomplete="current-password" required placeholder="<?php esc_attr_e('请输入密码', 'aksrt'); ?>">
<button type="button" class="aksrt-modal-auth__pass-toggle" aria-label="<?php esc_attr_e('显示或隐藏密码', 'aksrt'); ?>">
<i class="far fa-eye"></i>
<i class="fa fas fa-eye"></i>
</button>
</div>
</div>
@@ -127,7 +127,7 @@ $logo_url = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings:
<button type="submit" class="aksrt-modal-auth__submit">
<span><?php esc_html_e('登录', 'aksrt'); ?></span>
<i class="fas fa-spinner fa-spin" hidden></i>
<i class="fa fas fa-spinner fa-spin" hidden></i>
</button>
</form>
<?php endif; ?>
@@ -154,7 +154,7 @@ $logo_url = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings:
<div class="aksrt-modal-auth__pass-wrap">
<input type="password" id="modal-reg-pass" name="user_pass" autocomplete="new-password" required minlength="6" placeholder="<?php esc_attr_e('至少 6 位字符', 'aksrt'); ?>">
<button type="button" class="aksrt-modal-auth__pass-toggle" aria-label="<?php esc_attr_e('显示或隐藏密码', 'aksrt'); ?>">
<i class="far fa-eye"></i>
<i class="fa fas fa-eye"></i>
</button>
</div>
</div>
@@ -164,7 +164,7 @@ $logo_url = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings:
<div class="aksrt-modal-auth__pass-wrap">
<input type="password" id="modal-reg-pass-confirm" name="user_pass_confirm" autocomplete="new-password" required minlength="6" placeholder="<?php esc_attr_e('请再次输入密码', 'aksrt'); ?>">
<button type="button" class="aksrt-modal-auth__pass-toggle" aria-label="<?php esc_attr_e('显示或隐藏密码', 'aksrt'); ?>">
<i class="far fa-eye"></i>
<i class="fa fas fa-eye"></i>
</button>
</div>
</div>
@@ -201,7 +201,7 @@ $logo_url = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings:
<button type="submit" class="aksrt-modal-auth__submit">
<span><?php esc_html_e('注册', 'aksrt'); ?></span>
<i class="fas fa-spinner fa-spin" hidden></i>
<i class="fa fas fa-spinner fa-spin" hidden></i>
</button>
</form>
</div>
-57
View File
@@ -1,57 +0,0 @@
<?php
/**
* Layout 1/3 top search slide layer (zibll .navbar-search + search-box).
*
* Footer tabbar keeps templates/parts/search-panel.php (#tabbar-search-overlay).
* Top-nav icons use data-toggle-class="show" data-target=".navbar-search".
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
if (class_exists('\AKSRT\Settings\Settings')) {
$header_nav = \AKSRT\Settings\Settings::get_header_nav_settings();
if (empty($header_nav['search_enabled'])) {
return;
}
}
if (!function_exists('aksrt_get_search_box')) {
return;
}
$show_keywords = true;
$show_history = true;
$show_posts = true;
if (class_exists('\AKSRT\Settings\Settings')) {
$show_keywords = method_exists('\AKSRT\Settings\Settings', 'hot_search_enabled')
? (bool) \AKSRT\Settings\Settings::hot_search_enabled()
: true;
$show_history = method_exists('\AKSRT\Settings\Settings', 'search_history_enabled')
? (bool) \AKSRT\Settings\Settings::search_history_enabled()
: true;
$show_posts = method_exists('\AKSRT\Settings\Settings', 'search_posts_enabled')
? (bool) \AKSRT\Settings\Settings::search_posts_enabled()
: !empty(\AKSRT\Settings\Settings::get_value('search_posts', true));
}
?>
<div class="navbar-search main-search" data-aksrt-shell="navbar-search" aria-hidden="true">
<div class="container">
<button type="button" class="close navbar-search-close" data-toggle-class="show" data-target=".navbar-search" aria-label="<?php esc_attr_e('关闭搜索', 'aksrt'); ?>">
<i class="fas fa-times" aria-hidden="true"></i>
</button>
<?php
// Full form + keywords + history + hot posts (zibll show_form=true path).
echo aksrt_get_search_box([ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'show_form' => true,
'show_keywords' => $show_keywords,
'show_history' => $show_history,
'show_posts' => $show_posts,
'show_type' => true,
'show_input_cat'=> true,
's' => is_search() ? get_search_query() : '',
]);
?>
</div>
</div>
+18 -18
View File
@@ -162,12 +162,12 @@ if ($is_need_purchase && $user_amount > 0) {
<?php if ($has_paid_access && $user_amount > 0) : ?>
<span class="resource-download-box__sales-badge resource-download-box__paid-badge">
<i class="fas fa-check-circle" aria-hidden="true"></i>
<i class="fa fas fa-check-circle" aria-hidden="true"></i>
<?php esc_html_e('已购买', 'aksrt'); ?>
</span>
<?php elseif ($show_sales && $display_count > 0) : ?>
<span class="resource-download-box__sales-badge">
<i class="fas fa-fire" aria-hidden="true"></i>
<i class="fa fas fa-fire" aria-hidden="true"></i>
<?php
/* translators: %s: 下载/销量数 */
printf(esc_html__('已售 %s', 'aksrt'), number_format_i18n($display_count));
@@ -197,7 +197,7 @@ if ($is_need_purchase && $user_amount > 0) {
<div>
<p class="resource-download-box__eyebrow"><?php echo esc_html(sprintf(__('%s付费 / 下载能力', 'aksrt'), $subject_label)); ?></p>
<h2 class="resource-download-box__title">
<i class="fas fa-cloud-download-alt" aria-hidden="true"></i>
<i class="fa fas fa-cloud-download-alt" aria-hidden="true"></i>
<?php echo $has_paid_access ? esc_html__('资源下载', 'aksrt') : esc_html__('解锁下载', 'aksrt'); ?>
</h2>
</div>
@@ -260,7 +260,7 @@ if ($is_need_purchase && $user_amount > 0) {
<div class="resource-download-box__vip-pricing">
<?php if ($vip1_price > 0 && $vip1_price < $base_price) : ?>
<span class="resource-download-box__vip-badge resource-download-box__vip-badge--1">
<i class="fas fa-crown" aria-hidden="true"></i>
<i class="fa fas fa-certificate" aria-hidden="true"></i>
<?php
/* translators: %s: VIP1 价格 */
printf(esc_html__('VIP1 %s', 'aksrt'), $format_vip($vip1_price));
@@ -269,7 +269,7 @@ if ($is_need_purchase && $user_amount > 0) {
<?php endif; ?>
<?php if ($vip2_price > 0 && $vip2_price < $base_price) : ?>
<span class="resource-download-box__vip-badge resource-download-box__vip-badge--2">
<i class="fas fa-gem" aria-hidden="true"></i>
<i class="fa fas fa-gem" aria-hidden="true"></i>
<?php
/* translators: %s: VIP2 价格 */
printf(esc_html__('VIP2 %s', 'aksrt'), $format_vip($vip2_price));
@@ -292,7 +292,7 @@ if ($is_need_purchase && $user_amount > 0) {
<?php if ($is_need_vip || $member_blocked) : ?>
<div class="mt10 resource-download-box__vip-gate">
<a href="<?php echo esc_url($vip_url); ?>" class="resource-download-box__btn btn-primary resource-download-box__btn--vip">
<i class="fas fa-crown" aria-hidden="true"></i>
<i class="fa fas fa-certificate" aria-hidden="true"></i>
<span><?php echo esc_html($gate instanceof WP_Error ? $gate->get_error_message() : __('开通会员后下载', 'aksrt')); ?></span>
</a>
<?php
@@ -312,7 +312,7 @@ if ($is_need_purchase && $user_amount > 0) {
data-pay-modo="<?php echo esc_attr($pay_modo); ?>"
data-amount="<?php echo esc_attr((string) $user_amount); ?>"
>
<i class="fas fa-shopping-cart" aria-hidden="true"></i>
<i class="fa fas fa-shopping-cart" aria-hidden="true"></i>
<span><?php echo esc_html($purchase_label); ?></span>
</button>
<?php
@@ -324,7 +324,7 @@ if ($is_need_purchase && $user_amount > 0) {
<?php elseif (!empty($use_alone_entry)) : ?>
<div class="mt10 resource-download-box__alone">
<a target="_blank" rel="nofollow" href="<?php echo esc_url($alone_url); ?>" class="resource-download-box__btn btn-primary resource-download-box__btn--alone">
<i class="fas fa-download" aria-hidden="true"></i>
<i class="fa fas fa-download" aria-hidden="true"></i>
<span><?php esc_html_e('资源下载', 'aksrt'); ?></span>
</a>
<?php
@@ -373,7 +373,7 @@ if ($is_need_purchase && $user_amount > 0) {
data-source-type="<?php echo esc_attr($type); ?>"
style="--service-color: <?php echo esc_attr($service['color']); ?>"
>
<i class="fas <?php echo esc_attr($btn_icon); ?>" aria-hidden="true"></i>
<i class="fa <?php echo esc_attr($btn_icon); ?>" aria-hidden="true"></i>
<span><?php echo esc_html($btn_text); ?></span>
<span class="resource-download-box__service-badge" style="background: <?php echo esc_attr($service['color']); ?>">
<?php echo esc_html($service['name']); ?>
@@ -391,7 +391,7 @@ if ($is_need_purchase && $user_amount > 0) {
data-cost="<?php echo esc_attr((string) $cost); ?>"
style="--service-color: <?php echo esc_attr($service['color']); ?>"
>
<i class="fas <?php echo esc_attr($btn_icon); ?>" aria-hidden="true"></i>
<i class="fa <?php echo esc_attr($btn_icon); ?>" aria-hidden="true"></i>
<span><?php echo esc_html($btn_text); ?></span>
<span class="resource-download-box__service-badge" style="background: <?php echo esc_attr($service['color']); ?>">
<?php echo esc_html($service['name']); ?>
@@ -427,7 +427,7 @@ if ($is_need_purchase && $user_amount > 0) {
: sprintf(__('立即购买(%s%s)', 'aksrt'), $cash_symbol, function_exists('aksrt_format_price') ? aksrt_format_price($over_price) : (string) $over_price);
echo '<div class="mt10 resource-download-box__purchase-gate">';
echo '<button type="button" class="resource-download-box__btn btn-primary resource-download-box__btn--purchase cashier-link" data-action="aksrt-need-purchase" data-aksrt-pay-content="' . esc_attr((string) $post_id) . '" data-post-id="' . esc_attr((string) $post_id) . '" data-price-type="download_limit_over" data-pay-modo="' . esc_attr($pay_modo) . '" data-amount="' . esc_attr((string) $over_price) . '">';
echo '<i class="fas fa-shopping-cart" aria-hidden="true"></i><span>' . esc_html($over_label) . '</span></button></div>';
echo '<i class="fa fas fa-shopping-cart" aria-hidden="true"></i><span>' . esc_html($over_label) . '</span></button></div>';
}
} else {
$who = $vip_lv > 0 ? esc_html__('您是尊贵的会员,', 'aksrt') : esc_html__('您', 'aksrt');
@@ -442,9 +442,9 @@ if ($is_need_purchase && $user_amount > 0) {
echo aksrt_get_pay_service_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
?>
<span class="resource-download-box__guarantee"><i class="fas fa-shield-alt" aria-hidden="true"></i> <?php esc_html_e('安全检测', 'aksrt'); ?></span>
<span class="resource-download-box__guarantee"><i class="fas fa-crown" aria-hidden="true"></i> <?php esc_html_e('支持 VIP 权益', 'aksrt'); ?></span>
<span class="resource-download-box__guarantee"><i class="fas fa-coins" aria-hidden="true"></i> <?php esc_html_e('支持积分结算', 'aksrt'); ?></span>
<span class="resource-download-box__guarantee"><i class="fa fas fa-shield-alt" aria-hidden="true"></i> <?php esc_html_e('安全检测', 'aksrt'); ?></span>
<span class="resource-download-box__guarantee"><i class="fa fas fa-certificate" aria-hidden="true"></i> <?php esc_html_e('支持 VIP 权益', 'aksrt'); ?></span>
<span class="resource-download-box__guarantee"><i class="fa fas fa-money-bill" aria-hidden="true"></i> <?php esc_html_e('支持积分结算', 'aksrt'); ?></span>
<?php
}
?>
@@ -454,17 +454,17 @@ if ($is_need_purchase && $user_amount > 0) {
<?php if ($is_need_login) : ?>
<p class="resource-download-box__hint resource-download-box__hint--login">
<i class="fas fa-info-circle" aria-hidden="true"></i>
<i class="fa fas fa-info-circle" aria-hidden="true"></i>
<?php echo ($price_amount <= 0) ? esc_html__('免费资源,请登录后下载。', 'aksrt') : esc_html__('登录后可解锁并下载该内容。', 'aksrt'); ?>
</p>
<?php elseif ($is_need_vip || $member_blocked) : ?>
<p class="resource-download-box__hint resource-download-box__hint--vip">
<i class="fas fa-info-circle" aria-hidden="true"></i>
<i class="fa fas fa-info-circle" aria-hidden="true"></i>
<?php echo esc_html($gate instanceof WP_Error ? $gate->get_error_message() : __('该资源仅限会员购买/下载。', 'aksrt')); ?>
</p>
<?php elseif ($is_need_purchase) : ?>
<p class="resource-download-box__hint resource-download-box__hint--purchase">
<i class="fas fa-info-circle" aria-hidden="true"></i>
<i class="fa fas fa-info-circle" aria-hidden="true"></i>
<?php esc_html_e('请先完成购买后再下载该资源。', 'aksrt'); ?>
</p>
<?php endif; ?>
@@ -477,7 +477,7 @@ if ($is_need_purchase && $user_amount > 0) {
<footer class="resource-download-box__footer">
<p class="resource-download-box__notice-text">
<i class="fas fa-info-circle" aria-hidden="true"></i>
<i class="fa fas fa-info-circle" aria-hidden="true"></i>
<?php esc_html_e('下载能力是统一付费内容的一部分,请确认内容适用性后再使用。', 'aksrt'); ?>
</p>
</footer>
+8 -8
View File
@@ -47,7 +47,7 @@ if (!$has_any && !$has_demo && !$has_downloads) return;
<?php if (!empty($meta['version'])) : ?>
<div class="resource-meta-box__row">
<dt class="resource-meta-box__key">
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('version') : 'fas fa-code-branch'); ?>" aria-hidden="true"></i>
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('version') : 'fa fas fa-code-branch'); ?>" aria-hidden="true"></i>
<?php echo esc_html($rows['version']); ?>
</dt>
<dd class="resource-meta-box__val"><?php echo esc_html((string) $meta['version']); ?></dd>
@@ -57,7 +57,7 @@ if (!$has_any && !$has_demo && !$has_downloads) return;
<?php if (!empty($meta['size'])) : ?>
<div class="resource-meta-box__row">
<dt class="resource-meta-box__key">
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('size') : 'fas fa-hdd'); ?>" aria-hidden="true"></i>
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('size') : 'fa fas fa-hdd'); ?>" aria-hidden="true"></i>
<?php echo esc_html($rows['size']); ?>
</dt>
<dd class="resource-meta-box__val"><?php echo esc_html((string) $meta['size']); ?></dd>
@@ -67,7 +67,7 @@ if (!$has_any && !$has_demo && !$has_downloads) return;
<?php if (!empty($meta['compat'])) : ?>
<div class="resource-meta-box__row">
<dt class="resource-meta-box__key">
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('compat') : 'fas fa-laptop'); ?>" aria-hidden="true"></i>
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('compat') : 'fa fas fa-laptop'); ?>" aria-hidden="true"></i>
<?php echo esc_html($rows['compat']); ?>
</dt>
<dd class="resource-meta-box__val"><?php echo esc_html((string) $meta['compat']); ?></dd>
@@ -77,13 +77,13 @@ if (!$has_any && !$has_demo && !$has_downloads) return;
<?php if ($has_demo) : ?>
<div class="resource-meta-box__row">
<dt class="resource-meta-box__key">
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('demo_url') : 'fas fa-external-link-alt'); ?>" aria-hidden="true"></i>
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('demo_url') : 'fa fas fa-external-link-alt'); ?>" aria-hidden="true"></i>
<?php esc_html_e('演示地址', 'aksrt'); ?>
</dt>
<dd class="resource-meta-box__val">
<a class="resource-meta-box__demo-link" href="<?php echo esc_url($meta['demo_url']); ?>" target="_blank" rel="noopener noreferrer">
<?php esc_html_e('打开演示', 'aksrt'); ?>
<i class="fas fa-external-link-alt" aria-hidden="true"></i>
<i class="fa fas fa-external-link-alt" aria-hidden="true"></i>
</a>
</dd>
</div>
@@ -92,7 +92,7 @@ if (!$has_any && !$has_demo && !$has_downloads) return;
<?php if (!empty($meta['license'])) : ?>
<div class="resource-meta-box__row">
<dt class="resource-meta-box__key">
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('license') : 'fas fa-shield-alt'); ?>" aria-hidden="true"></i>
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('license') : 'fa fas fa-shield-alt'); ?>" aria-hidden="true"></i>
<?php echo esc_html($rows['license']); ?>
</dt>
<dd class="resource-meta-box__val"><?php echo esc_html((string) $meta['license']); ?></dd>
@@ -102,7 +102,7 @@ if (!$has_any && !$has_demo && !$has_downloads) return;
<?php if ($has_downloads) : ?>
<div class="resource-meta-box__row">
<dt class="resource-meta-box__key">
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('download') : 'fas fa-download'); ?>" aria-hidden="true"></i>
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('download') : 'fa fas fa-download'); ?>" aria-hidden="true"></i>
<?php esc_html_e('下载次数', 'aksrt'); ?>
</dt>
<dd class="resource-meta-box__val"><?php echo esc_html(number_format_i18n((int) $meta['download_count'])); ?></dd>
@@ -112,7 +112,7 @@ if (!$has_any && !$has_demo && !$has_downloads) return;
<?php if (($meta['view_count'] ?? 0) > 0) : ?>
<div class="resource-meta-box__row">
<dt class="resource-meta-box__key">
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('views') : 'fas fa-eye'); ?>" aria-hidden="true"></i>
<i class="<?php echo esc_attr(function_exists('aksrt_resource_meta_icon') ? aksrt_resource_meta_icon('views') : 'fa fas fa-eye'); ?>" aria-hidden="true"></i>
<?php esc_html_e('浏览次数', 'aksrt'); ?>
</dt>
<dd class="resource-meta-box__val"><?php echo esc_html(number_format_i18n((int) $meta['view_count'])); ?></dd>
-147
View File
@@ -1,147 +0,0 @@
<?php
/**
* Footer tabbar / shell search overlay (NOT the top-nav zibll slide).
*
* Top navigation uses templates/parts/navbar-search.php (.navbar-search) for
* layouts 1/3 and remote menu_search for layout 2.
*
* DOM contracts for assets/js/core/search.js and footer-tabbar search tab:
* - #tabbar-search-overlay (also #nav-search-panel for shell config)
* - #tabbar-search-input / #tabbar-search-close / #tabbar-search-type
* - #tabbar-search-types [data-search-type]
* - history / suggestions sections
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
if (class_exists('\AKSRT\Settings\Settings')) {
$header_nav = \AKSRT\Settings\Settings::get_header_nav_settings();
if (empty($header_nav['search_enabled'])) {
return;
}
}
$search_state = function_exists('aksrt_get_search_form_state')
? aksrt_get_search_form_state()
: [
'type' => 'post',
'types' => ['post' => __('文章', 'aksrt')],
'category_id' => 0,
'category_enabled' => false,
'categories' => [],
];
$search_type = (string) ($search_state['type'] ?? 'post');
$search_type_options = is_array($search_state['types'] ?? null) ? $search_state['types'] : ['post' => __('文章', 'aksrt')];
$search_category_enabled = !empty($search_state['category_enabled']);
$search_category_id = (int) ($search_state['category_id'] ?? 0);
$search_categories = is_array($search_state['categories'] ?? null) ? $search_state['categories'] : [];
$search_placeholder = function_exists('aksrt_get_search_placeholder') ? aksrt_get_search_placeholder() : __('开启精彩搜索', 'aksrt');
$search_hot_keywords = function_exists('aksrt_get_search_hot_keywords') ? aksrt_get_search_hot_keywords() : [];
$history_enabled = function_exists('aksrt_search_history_enabled') ? aksrt_search_history_enabled() : true;
$suggestions_enabled = function_exists('aksrt_search_suggestions_enabled') ? aksrt_search_suggestions_enabled() : false;
$popular_title = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::search_popular_title() : __('热门搜索', 'aksrt');
?>
<div
id="tabbar-search-overlay"
class="tabbar-search-overlay main-search navbar-search nav-search-panel"
data-aksrt-shell="search-panel"
data-nav-search-panel="nav-search-panel"
hidden
aria-hidden="true"
>
<div class="tabbar-search-overlay__dialog" role="dialog" aria-modal="true" aria-labelledby="tabbar-search-title">
<div class="tabbar-search-overlay__head">
<strong id="tabbar-search-title"><?php esc_html_e('搜索', 'aksrt'); ?></strong>
<button type="button" class="tabbar-search-overlay__close" id="tabbar-search-close" aria-label="<?php esc_attr_e('关闭搜索', 'aksrt'); ?>">
<i class="fas fa-times" aria-hidden="true"></i>
</button>
</div>
<form
role="search"
method="get"
class="tabbar-search-overlay__form search-form"
action="<?php echo esc_url(home_url('/')); ?>"
data-aksrt-search-form="panel"
data-default-search-type="<?php echo esc_attr($search_type); ?>"
data-default-category="<?php echo esc_attr((string) $search_category_id); ?>"
>
<input type="hidden" name="aksrt_search_type" id="tabbar-search-type" value="<?php echo esc_attr($search_type); ?>">
<?php if ($search_category_enabled) : ?>
<input type="hidden" name="aksrt_category" value="<?php echo esc_attr((string) $search_category_id); ?>">
<?php endif; ?>
<span class="tabbar-search-overlay__icon" aria-hidden="true"><i class="fas fa-search"></i></span>
<label class="screen-reader-text" for="tabbar-search-input"><?php esc_html_e('搜索关键词', 'aksrt'); ?></label>
<input
id="tabbar-search-input"
class="search-input"
type="search"
name="s"
value="<?php echo esc_attr(get_search_query()); ?>"
placeholder="<?php echo esc_attr($search_placeholder); ?>"
autocomplete="off"
enterkeyhint="search"
>
<button type="submit" class="tabbar-search-overlay__submit"><?php esc_html_e('搜索', 'aksrt'); ?></button>
</form>
<?php if (!empty($search_type_options)) : ?>
<div class="tabbar-search-overlay__types" id="tabbar-search-types" aria-label="<?php esc_attr_e('搜索类型', 'aksrt'); ?>">
<?php foreach ($search_type_options as $type_key => $type_label) : ?>
<button
type="button"
class="tabbar-search-overlay__type<?php echo $search_type === $type_key ? ' is-active' : ''; ?>"
data-search-type="<?php echo esc_attr((string) $type_key); ?>"
><?php echo esc_html((string) $type_label); ?></button>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($search_category_enabled && !empty($search_categories)) : ?>
<div class="tabbar-search-overlay__section">
<label class="tabbar-search-overlay__label" for="tabbar-search-category"><?php esc_html_e('分类', 'aksrt'); ?></label>
<select class="nav-searchbox__category" id="tabbar-search-category" data-search-category-select>
<option value="0"><?php esc_html_e('全部分类', 'aksrt'); ?></option>
<?php foreach ($search_categories as $search_category) : ?>
<option value="<?php echo esc_attr((string) $search_category->term_id); ?>"<?php selected($search_category_id, (int) $search_category->term_id); ?>>
<?php echo esc_html($search_category->name); ?>
</option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if (!empty($search_hot_keywords)) : ?>
<div class="tabbar-search-overlay__section">
<div class="tabbar-search-overlay__section-head">
<span class="tabbar-search-overlay__label"><?php echo esc_html($popular_title); ?></span>
</div>
<?php aksrt_render_search_hot_keywords($search_hot_keywords, 'aksrt-search-hot-keywords'); ?>
</div>
<?php endif; ?>
<?php if ($history_enabled) : ?>
<div class="tabbar-search-overlay__section" id="tabbar-search-history-section">
<div class="tabbar-search-overlay__section-head">
<span class="tabbar-search-overlay__label"><?php esc_html_e('历史搜索', 'aksrt'); ?></span>
<button type="button" class="tabbar-search-overlay__clear" id="tabbar-search-history-clear" style="display:none;">
<?php esc_html_e('清空', 'aksrt'); ?>
</button>
</div>
<div class="tabbar-search-overlay__history" id="tabbar-search-history"></div>
</div>
<?php endif; ?>
<?php if ($suggestions_enabled) : ?>
<div class="tabbar-search-overlay__section" id="tabbar-search-suggestions-section" hidden>
<div class="tabbar-search-overlay__section-head">
<span class="tabbar-search-overlay__label"><?php esc_html_e('搜索建议', 'aksrt'); ?></span>
</div>
<div class="tabbar-search-overlay__suggestions" id="tabbar-search-suggestions"></div>
</div>
<?php endif; ?>
</div>
</div>
+3 -3
View File
@@ -116,11 +116,11 @@ $is_self = is_user_logged_in() && get_current_user_id() === $author_id;
<?php if (!$is_self) : ?>
<?php if (is_user_logged_in()) : ?>
<button type="button" class="px12-sm ml10 follow but c-red" data-aksrt-follow="<?php echo (int) $author_id; ?>">
<i class="fa fa-heart em09" aria-hidden="true"></i> <span><?php esc_html_e('关注', 'aksrt'); ?></span>
<i class="fa fas fa-heart em09" aria-hidden="true"></i> <span><?php esc_html_e('关注', 'aksrt'); ?></span>
</button>
<?php if ($aksrt_pm_on && $aksrt_msg_url !== '') : ?>
<a href="<?php echo esc_url(add_query_arg('msg_type', 'conversation', $aksrt_msg_url)); ?>" class="ml6 but c-blue px12-sm">
<i class="fa fa-comment em09" aria-hidden="true"></i> <?php esc_html_e('私信', 'aksrt'); ?>
<i class="fa fas fa-comment em09" aria-hidden="true"></i> <?php esc_html_e('私信', 'aksrt'); ?>
</a>
<?php endif; ?>
<?php
@@ -134,7 +134,7 @@ $is_self = is_user_logged_in() && get_current_user_id() === $author_id;
?>
<?php else : ?>
<a href="<?php echo esc_url($login_url); ?>" class="px12-sm ml10 follow but c-red">
<i class="fa fa-heart em09" aria-hidden="true"></i> <?php esc_html_e('关注', 'aksrt'); ?>
<i class="fa fas fa-heart em09" aria-hidden="true"></i> <?php esc_html_e('关注', 'aksrt'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
+8 -8
View File
@@ -35,7 +35,7 @@ $is_can_new = !empty($ctx['is_can_new']);
<?php if (!$is_can_new) : ?>
<div class="aksrt-submit-nocan">
<div class="aksrt-submit-nocan__icon"><i class="fas fa-lock"></i></div>
<div class="aksrt-submit-nocan__icon"><i class="fa fas fa-lock"></i></div>
<p><?php esc_html_e('无法发布', 'aksrt'); ?></p>
<p class="muted"><?php esc_html_e('你当前没有前台投稿权限,请联系管理员开通。', 'aksrt'); ?></p>
</div>
@@ -67,23 +67,23 @@ $is_can_new = !empty($ctx['is_can_new']);
<div class="aksrt-submit-shortcode-tools">
<?php if (!empty($ctx['can_upload_img'])) : ?>
<button type="button" class="but" data-insert-upload-image>
<i class="fas fa-image"></i> <?php esc_html_e('上传图片', 'aksrt'); ?>
<i class="fa fas fa-image"></i> <?php esc_html_e('上传图片', 'aksrt'); ?>
</button>
<?php endif; ?>
<?php if (!empty($ctx['can_hide'])) : ?>
<button type="button" class="but" data-insert-shortcode="hide" title="<?php esc_attr_e('插入登录后可见', 'aksrt'); ?>">
<i class="fas fa-eye-slash"></i> <?php esc_html_e('登录可见', 'aksrt'); ?>
<i class="fa fas fa-eye-slash"></i> <?php esc_html_e('登录可见', 'aksrt'); ?>
</button>
<button type="button" class="but" data-insert-shortcode="reply" title="<?php esc_attr_e('插入回复后可见', 'aksrt'); ?>">
<i class="fas fa-comment-dots"></i> <?php esc_html_e('回复可见', 'aksrt'); ?>
<i class="fa fas fa-comment-dots"></i> <?php esc_html_e('回复可见', 'aksrt'); ?>
</button>
<button type="button" class="but" data-insert-shortcode="vip" title="<?php esc_attr_e('插入 VIP 可见', 'aksrt'); ?>">
<i class="fas fa-crown"></i> <?php esc_html_e('VIP 可见', 'aksrt'); ?>
<i class="fa fas fa-certificate"></i> <?php esc_html_e('VIP 可见', 'aksrt'); ?>
</button>
<?php endif; ?>
<?php if (!empty($ctx['can_pay'])) : ?>
<button type="button" class="but" data-insert-shortcode="payshow" title="<?php esc_attr_e('插入付费可见内容', 'aksrt'); ?>">
<i class="fas fa-lock"></i> <?php esc_html_e('付费可见', 'aksrt'); ?>
<i class="fa fas fa-lock"></i> <?php esc_html_e('付费可见', 'aksrt'); ?>
</button>
<?php endif; ?>
</div>
@@ -94,7 +94,7 @@ $is_can_new = !empty($ctx['is_can_new']);
<span class="aksrt-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 fa-file-text-o"></i> <?php esc_html_e('预览文章', 'aksrt'); ?>
<i class="fa fas fa-file-alt"></i> <?php esc_html_e('预览文章', 'aksrt'); ?>
</a>
<?php if (current_user_can('manage_options')) : ?>
<a class="but c-yellow" href="<?php echo esc_url(get_edit_post_link($edit_post)); ?>">
@@ -116,7 +116,7 @@ $is_can_new = !empty($ctx['is_can_new']);
(int) $ctx['draft_count']
);
?>
<i class="fa fa-angle-right"></i>
<i class="fa fas fa-angle-right"></i>
</a>
<?php endif; ?>
<?php endif; ?>
+8 -8
View File
@@ -31,17 +31,17 @@ $can_video = !empty($ctx['can_cover_video']);
<img src="<?php echo esc_url((string) $data['url']); ?>" alt="">
<?php elseif ($type === 'slide' && is_array($data) && !empty($data[0]['url'])) : ?>
<img src="<?php echo esc_url((string) $data[0]['url']); ?>" alt="">
<span class="aksrt-submit-featured__badge"><i class="fas fa-images"></i></span>
<span class="aksrt-submit-featured__badge"><i class="fa fas fa-image"></i></span>
<?php elseif ($type === 'video') : ?>
<?php if (!empty($data['pic'])) : ?>
<img src="<?php echo esc_url((string) $data['pic']); ?>" alt="">
<?php else : ?>
<div class="aksrt-submit-featured__video-placeholder"><i class="fas fa-play"></i></div>
<div class="aksrt-submit-featured__video-placeholder"><i class="fa fas fa-play"></i></div>
<?php endif; ?>
<span class="aksrt-submit-featured__badge"><i class="fas fa-video"></i></span>
<span class="aksrt-submit-featured__badge"><i class="fa fas fa-video"></i></span>
<?php else : ?>
<div class="aksrt-submit-featured__empty">
<i class="fas fa-image"></i>
<i class="fa fas fa-image"></i>
<span><?php esc_html_e('设置文章封面', 'aksrt'); ?></span>
</div>
<?php endif; ?>
@@ -49,21 +49,21 @@ $can_video = !empty($ctx['can_cover_video']);
<div class="aksrt-submit-featured__actions">
<?php if ($can_image) : ?>
<button type="button" class="but" data-featured-action="image">
<i class="fas fa-image"></i> <?php esc_html_e('图片', 'aksrt'); ?>
<i class="fa fas fa-image"></i> <?php esc_html_e('图片', 'aksrt'); ?>
</button>
<?php endif; ?>
<?php if ($can_slide) : ?>
<button type="button" class="but" data-featured-action="slide">
<i class="fas fa-images"></i> <?php esc_html_e('幻灯片', 'aksrt'); ?>
<i class="fa fas fa-image"></i> <?php esc_html_e('幻灯片', 'aksrt'); ?>
</button>
<?php endif; ?>
<?php if ($can_video) : ?>
<button type="button" class="but" data-featured-action="video">
<i class="fas fa-video"></i> <?php esc_html_e('视频', 'aksrt'); ?>
<i class="fa fas fa-video"></i> <?php esc_html_e('视频', 'aksrt'); ?>
</button>
<?php endif; ?>
<button type="button" class="but c-red" data-featured-action="close" <?php echo $type === '' ? 'hidden' : ''; ?>>
<i class="fas fa-trash"></i> <?php esc_html_e('清除', 'aksrt'); ?>
<i class="fa fas fa-trash-alt"></i> <?php esc_html_e('清除', 'aksrt'); ?>
</button>
</div>
<input type="hidden" name="featured_type" value="<?php echo esc_attr($type); ?>" data-featured-type>
+4 -4
View File
@@ -119,11 +119,11 @@ $downloads = is_array($pay['downloads'] ?? null) ? $pay['downloads'] : [];
<strong><?php esc_html_e('付费下载', 'aksrt'); ?></strong>
<span>
<button type="button" class="but hollow c-blue" data-pay-download-add>
<i class="fas fa-plus"></i> <?php esc_html_e('添加资源', 'aksrt'); ?>
<i class="fa fas fa-plus"></i> <?php esc_html_e('添加资源', 'aksrt'); ?>
</button>
<?php if (!empty($ctx['can_upload_file'])) : ?>
<button type="button" class="but hollow" data-pay-download-upload>
<i class="fas fa-upload"></i> <?php esc_html_e('上传附件', 'aksrt'); ?>
<i class="fa fas fa-upload"></i> <?php esc_html_e('上传附件', 'aksrt'); ?>
</button>
<?php endif; ?>
</span>
@@ -138,7 +138,7 @@ $downloads = is_array($pay['downloads'] ?? null) ? $pay['downloads'] : [];
<input type="url" class="aksrt-form-input" data-pay-download-url name="aksrt_pay[downloads][<?php echo (int) $i; ?>][url]" value="<?php echo esc_attr($url); ?>" placeholder="<?php esc_attr_e('资源链接', 'aksrt'); ?>">
<input type="text" class="aksrt-form-input" data-pay-download-label name="aksrt_pay[downloads][<?php echo (int) $i; ?>][label]" value="<?php echo esc_attr($label); ?>" placeholder="<?php esc_attr_e('名称', 'aksrt'); ?>">
<input type="text" class="aksrt-form-input" name="aksrt_pay[downloads][<?php echo (int) $i; ?>][extract_code]" value="<?php echo esc_attr($code); ?>" placeholder="<?php esc_attr_e('提取码/备注', 'aksrt'); ?>">
<button type="button" class="but c-red cir" data-pay-download-remove title="<?php esc_attr_e('删除', 'aksrt'); ?>"><i class="fas fa-trash"></i></button>
<button type="button" class="but c-red cir" data-pay-download-remove title="<?php esc_attr_e('删除', 'aksrt'); ?>"><i class="fa fas fa-trash-alt"></i></button>
</div>
<?php endforeach; ?>
</div>
@@ -147,7 +147,7 @@ $downloads = is_array($pay['downloads'] ?? null) ? $pay['downloads'] : [];
<input type="url" class="aksrt-form-input" data-name="url" data-pay-download-url placeholder="<?php esc_attr_e('资源链接', 'aksrt'); ?>">
<input type="text" class="aksrt-form-input" data-name="label" data-pay-download-label placeholder="<?php esc_attr_e('名称', 'aksrt'); ?>">
<input type="text" class="aksrt-form-input" data-name="extract_code" placeholder="<?php esc_attr_e('提取码/备注', 'aksrt'); ?>">
<button type="button" class="but c-red cir" data-pay-download-remove title="<?php esc_attr_e('删除', 'aksrt'); ?>"><i class="fas fa-trash"></i></button>
<button type="button" class="but c-red cir" data-pay-download-remove title="<?php esc_attr_e('删除', 'aksrt'); ?>"><i class="fa fas fa-trash-alt"></i></button>
</div>
</template>
</div>
+4 -4
View File
@@ -41,11 +41,11 @@ if ($edit_post && in_array($status, ['publish', 'pending'], true)) {
<div class="aksrt-submit-actions__btns">
<?php if ($can_draft) : ?>
<button type="button" class="but jb-green aksrt-submit-btn" data-action="posts_draft">
<i class="fa fa-dot-circle-o"></i> <?php esc_html_e('保存草稿', 'aksrt'); ?>
<i class="fa fas fa-dot-circle"></i> <?php esc_html_e('保存草稿', 'aksrt'); ?>
</button>
<?php endif; ?>
<button type="button" class="but jb-blue aksrt-submit-btn" data-action="posts_save" id="aksrt-submit-btn">
<i class="fa fa-check-square-o"></i>
<i class="fa fas fa-check-square"></i>
<?php
printf(
/* translators: %s: 发布|审核|保存 */
@@ -62,7 +62,7 @@ if ($edit_post && in_array($status, ['publish', 'pending'], true)) {
<?php if (!empty($ctx['user_drafts'])) : ?>
<div class="aksrt-submit-panel aksrt-submit-drafts">
<div class="aksrt-submit-panel__title">
<i class="fas fa-file-alt"></i> <?php esc_html_e('我的草稿', 'aksrt'); ?>
<i class="fa fas fa-file-alt"></i> <?php esc_html_e('我的草稿', 'aksrt'); ?>
</div>
<div class="aksrt-submit-panel__body">
<?php foreach ($ctx['user_drafts'] as $draft) :
@@ -76,7 +76,7 @@ if ($edit_post && in_array($status, ['publish', 'pending'], true)) {
<time><?php echo esc_html(get_the_modified_date('Y-m-d H:i', $draft)); ?></time>
</a>
<button type="button" class="aksrt-submit-drafts__delete" data-draft-id="<?php echo esc_attr((string) $draft->ID); ?>" title="<?php esc_attr_e('删除草稿', 'aksrt'); ?>">
<i class="fas fa-trash"></i>
<i class="fa fas fa-trash-alt"></i>
</button>
</div>
<?php endforeach; ?>
+4 -4
View File
@@ -33,8 +33,8 @@ if (file_exists($term_helper)) {
<?php if (!empty($settings['allow_category'])) : ?>
<details class="aksrt-submit-drop" open>
<summary>
<span><i class="fa fa-folder-open-o"></i> <?php esc_html_e('分类', 'aksrt'); ?></span>
<i class="fa fa-angle-right"></i>
<span><i class="fa fas fa-folder-open"></i> <?php esc_html_e('分类', 'aksrt'); ?></span>
<i class="fa fas fa-angle-right"></i>
</summary>
<div class="aksrt-submit-drop__body">
<?php
@@ -64,8 +64,8 @@ if (file_exists($term_helper)) {
?>
<details class="aksrt-submit-drop">
<summary>
<span><i class="fa fa-filter"></i> <?php echo esc_html($name); ?></span>
<i class="fa fa-angle-right"></i>
<span><i class="fa fas fa-filter"></i> <?php echo esc_html($name); ?></span>
<i class="fa fas fa-angle-right"></i>
</summary>
<div class="aksrt-submit-drop__body aksrt-submit-tags">
<?php foreach ($vals as $val) :
@@ -21,7 +21,7 @@ $status_labels = ['publish' => __('已发布', 'aksrt'), 'draft' => __('草稿',
?>
<article class="creator-post-row" data-post-id="<?php echo esc_attr((string) $post_id); ?>">
<a class="creator-post-row__thumb" href="<?php echo esc_url(get_permalink($post_id)); ?>" aria-label="<?php echo esc_attr(get_the_title()); ?>">
<?php if (has_post_thumbnail($post_id)) : the_post_thumbnail('medium'); else : ?><span><i class="fas fa-feather-alt" aria-hidden="true"></i></span><?php endif; ?>
<?php if (has_post_thumbnail($post_id)) : the_post_thumbnail('medium'); else : ?><span><i class="fa fas fa-pen" aria-hidden="true"></i></span><?php endif; ?>
</a>
<div class="creator-post-row__body"><div class="creator-post-row__heading"><h4><a href="<?php echo esc_url(get_permalink($post_id)); ?>"><?php echo esc_html(get_the_title()); ?></a></h4><span class="creator-post-row__status creator-post-row__status--<?php echo esc_attr($post_status); ?>"><?php echo esc_html($status_labels[$post_status] ?? $post_status); ?></span></div><p><?php echo esc_html(wp_trim_words(get_the_excerpt(), 20, '…')); ?></p><div class="creator-post-row__meta"><time datetime="<?php echo esc_attr(get_the_date('c')); ?>"><?php echo esc_html(get_the_date()); ?></time><span><?php echo $price > 0 ? esc_html__('付费内容', 'aksrt') : esc_html__('免费内容', 'aksrt'); ?></span></div></div>
<div class="creator-post-row__actions"><?php if ($edit_url) : ?><a href="<?php echo esc_url($edit_url); ?>" class="creator-post-row__action"><?php esc_html_e('编辑', 'aksrt'); ?></a><?php endif; ?><a href="<?php echo esc_url(get_permalink($post_id)); ?>" class="creator-post-row__action"><?php esc_html_e('查看', 'aksrt'); ?></a><?php if ($can_delete) : ?><button type="button" class="creator-post-row__action creator-post-row__action--danger" data-action="delete-post" data-post-id="<?php echo esc_attr((string) $post_id); ?>" data-nonce="<?php echo esc_attr(wp_create_nonce('aksrt_submit')); ?>"><?php esc_html_e('删除', 'aksrt'); ?></button><?php endif; ?></div>
@@ -30,5 +30,5 @@ $status_labels = ['publish' => __('已发布', 'aksrt'), 'draft' => __('草稿',
</div>
<?php aksrt_render_profile_pagination((int) $q->max_num_pages, $page, 'creator_page'); wp_reset_postdata(); ?>
<?php else : ?>
<div class="creator-workspace__empty"><i class="fas fa-feather-alt" aria-hidden="true"></i><h4><?php esc_html_e('还没有文章', 'aksrt'); ?></h4><p><?php esc_html_e('开始创作你的第一篇文章吧。', 'aksrt'); ?></p><?php if (!empty($new_post_url)) : ?><a class="btn-primary btn-sm" href="<?php echo esc_url($new_post_url); ?>"><?php esc_html_e('写新文章', 'aksrt'); ?></a><?php endif; ?></div>
<div class="creator-workspace__empty"><i class="fa fas fa-pen" aria-hidden="true"></i><h4><?php esc_html_e('还没有文章', 'aksrt'); ?></h4><p><?php esc_html_e('开始创作你的第一篇文章吧。', 'aksrt'); ?></p><?php if (!empty($new_post_url)) : ?><a class="btn-primary btn-sm" href="<?php echo esc_url($new_post_url); ?>"><?php esc_html_e('写新文章', 'aksrt'); ?></a><?php endif; ?></div>
<?php endif; ?>
+2 -2
View File
@@ -33,12 +33,12 @@ extract($args, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_ext
<div class="uh-follow__subtabs">
<a class="uh-follow__subtab<?php echo $follow_sub === 'following' ? ' is-active' : ''; ?>"
href="<?php echo esc_url(add_query_arg(['tab' => 'follow', 'follow_sub' => 'following', 'follow_page' => 1], $home_url)); ?>">
<i class="fas fa-user-plus"></i> <?php esc_html_e('关注', 'aksrt'); ?>
<i class="fa fas fa-user-plus"></i> <?php esc_html_e('关注', 'aksrt'); ?>
<span class="uh-follow__subtab-count"><?php echo esc_html((string) $following_count); ?></span>
</a>
<a class="uh-follow__subtab<?php echo $follow_sub === 'followers' ? ' is-active' : ''; ?>"
href="<?php echo esc_url(add_query_arg(['tab' => 'follow', 'follow_sub' => 'followers', 'follow_page' => 1], $home_url)); ?>">
<i class="fas fa-users"></i> <?php esc_html_e('粉丝', 'aksrt'); ?>
<i class="fa fas fa-users"></i> <?php esc_html_e('粉丝', 'aksrt'); ?>
<span class="uh-follow__subtab-count"><?php echo esc_html((string) $follower_count); ?></span>
</a>
</div>
+11 -11
View File
@@ -67,19 +67,19 @@ $pm_url = ($pm_enabled && $messages_url !== '')
<?php if ($follower_count > 0) : ?>
<div class="aksrt-author-hero__cover-metas" aria-label="<?php esc_attr_e('主页数据', 'aksrt'); ?>">
<span class="aksrt-author-hero__cover-meta" title="<?php esc_attr_e('粉丝', 'aksrt'); ?>">
<i class="fas fa-heart" aria-hidden="true"></i>
<i class="fa fas fa-heart" aria-hidden="true"></i>
<?php echo esc_html((string) $follower_count); ?>
</span>
</div>
<?php endif; ?>
<?php if ($has_more_details || ($show_report && !$is_own)) : ?>
<div class="aksrt-cover-menu aksrt-cover-menu--author" data-aksrt-menu>
<button type="button" class="aksrt-cover-menu__trigger" aria-haspopup="true" aria-expanded="false" aria-label="<?php esc_attr_e('个人主页操作', 'aksrt'); ?>"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></button>
<button type="button" class="aksrt-cover-menu__trigger" aria-haspopup="true" aria-expanded="false" aria-label="<?php esc_attr_e('个人主页操作', 'aksrt'); ?>"><i class="fa fas fa-ellipsis-h" aria-hidden="true"></i></button>
<div class="aksrt-cover-menu__panel" role="menu" hidden>
<?php if ($has_more_details) : ?><button type="button" role="menuitem" data-aksrt-profile-details><i class="fas fa-address-card" aria-hidden="true"></i><?php esc_html_e('更多资料', 'aksrt'); ?></button><?php endif; ?>
<?php if ($has_more_details) : ?><button type="button" role="menuitem" data-aksrt-profile-details><i class="fa fas fa-address-card" aria-hidden="true"></i><?php esc_html_e('更多资料', 'aksrt'); ?></button><?php endif; ?>
<?php if ($show_report && !$is_own) : ?>
<?php if (is_user_logged_in()) : ?><button type="button" role="menuitem" data-aksrt-report='{"target_type":"user","target_id":<?php echo (int) $user_id; ?>}'><i class="far fa-flag" aria-hidden="true"></i><?php esc_html_e('举报用户', 'aksrt'); ?></button>
<?php else : ?><a role="menuitem" href="<?php echo esc_url(aksrt_get_login_url($home_url)); ?>"><i class="far fa-flag" aria-hidden="true"></i><?php esc_html_e('举报用户', 'aksrt'); ?></a><?php endif; ?>
<?php if (is_user_logged_in()) : ?><button type="button" role="menuitem" data-aksrt-report='{"target_type":"user","target_id":<?php echo (int) $user_id; ?>}'><i class="fa fas fa-flag" aria-hidden="true"></i><?php esc_html_e('举报用户', 'aksrt'); ?></button>
<?php else : ?><a role="menuitem" href="<?php echo esc_url(aksrt_get_login_url($home_url)); ?>"><i class="fa fas fa-flag" aria-hidden="true"></i><?php esc_html_e('举报用户', 'aksrt'); ?></a><?php endif; ?>
<?php endif; ?>
</div>
</div>
@@ -141,12 +141,12 @@ $pm_url = ($pm_enabled && $messages_url !== '')
<div class="aksrt-author-hero__actions">
<?php if ($is_own) : ?>
<a href="<?php echo esc_url(aksrt_get_user_center_url()); ?>" class="btn-primary btn-sm">
<i class="fas fa-user" aria-hidden="true"></i>
<i class="fa fas fa-user" aria-hidden="true"></i>
<span><?php esc_html_e('用户中心', 'aksrt'); ?></span>
</a>
<?php if ($show_message && $messages_url !== '') : ?>
<a href="<?php echo esc_url($messages_url); ?>" class="btn-ghost btn-sm">
<i class="fas fa-bell" aria-hidden="true"></i>
<i class="fa fas fa-bell" aria-hidden="true"></i>
<span><?php esc_html_e('消息', 'aksrt'); ?></span>
</a>
<?php endif; ?>
@@ -154,12 +154,12 @@ $pm_url = ($pm_enabled && $messages_url !== '')
<?php if ($show_follow) : ?>
<?php if (is_user_logged_in()) : ?>
<button type="button" class="btn-outline btn-sm aksrt-author-hero__follow-btn" data-aksrt-follow="<?php echo (int) $user_id; ?>" title="<?php esc_attr_e('关注该用户', 'aksrt'); ?>">
<i class="far fa-heart" aria-hidden="true"></i>
<i class="fa fas fa-heart" aria-hidden="true"></i>
<span><?php esc_html_e('关注', 'aksrt'); ?></span>
</button>
<?php else : ?>
<a href="<?php echo esc_url(aksrt_get_login_url($home_url)); ?>" class="btn-outline btn-sm aksrt-author-hero__follow-btn">
<i class="far fa-heart" aria-hidden="true"></i>
<i class="fa fas fa-heart" aria-hidden="true"></i>
<span><?php esc_html_e('登录后关注', 'aksrt'); ?></span>
</a>
<?php endif; ?>
@@ -168,12 +168,12 @@ $pm_url = ($pm_enabled && $messages_url !== '')
<?php if ($show_message && $pm_url !== '') : ?>
<?php if (is_user_logged_in()) : ?>
<a href="<?php echo esc_url($pm_url); ?>" class="btn-primary btn-sm">
<i class="fas fa-comment" aria-hidden="true"></i>
<i class="fa fas fa-comment" aria-hidden="true"></i>
<span><?php esc_html_e('私信', 'aksrt'); ?></span>
</a>
<?php else : ?>
<a href="<?php echo esc_url(aksrt_get_login_url($home_url)); ?>" class="btn-primary btn-sm">
<i class="fas fa-comment" aria-hidden="true"></i>
<i class="fa fas fa-comment" aria-hidden="true"></i>
<span><?php esc_html_e('私信', 'aksrt'); ?></span>
</a>
<?php endif; ?>