导入 AKSRT 主题开发源码

This commit is contained in:
Claude Code
2026-07-03 22:50:34 +08:00
parent 9681dd3d48
commit 1268a55dd0
595 changed files with 127705 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
<?php
/**
* Sidebar template.
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
if (wp_is_mobile()) {
return;
}
$sidebar_id = function_exists('aksrt_resolve_sidebar_id')
? aksrt_resolve_sidebar_id()
: 'sidebar-blog';
$sidebar_prepend_html = (string) get_query_var('aksrt_sidebar_prepend_html', '');
if ($sidebar_prepend_html === ''
&& !is_active_sidebar($sidebar_id)
&& !is_active_sidebar('all_sidebar_top')
&& !is_active_sidebar('all_sidebar_bottom')) {
return;
}
?>
<div class="sidebar" role="complementary" aria-label="<?php esc_attr_e('侧栏', 'aksrt'); ?>">
<?php if ($sidebar_prepend_html !== '') : ?>
<?php echo $sidebar_prepend_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
<?php if (is_active_sidebar('all_sidebar_top')) : ?>
<?php dynamic_sidebar('all_sidebar_top'); ?>
<?php endif; ?>
<?php if (is_active_sidebar($sidebar_id)) : ?>
<?php dynamic_sidebar($sidebar_id); ?>
<?php endif; ?>
<?php if (is_active_sidebar('all_sidebar_bottom')) : ?>
<?php dynamic_sidebar('all_sidebar_bottom'); ?>
<?php endif; ?>
</div>