清 single/home 残层:删 sidebar prepend 与 author-bar query-var

去掉 generic sidebar 的 prepend patch、author-bar ambient 回退,
以及 homepage section 多余 wrapper,保持主线闭环更干净。
This commit is contained in:
kate522 committed 2026-07-09 21:56:30 +08:00
1 parent 29bd9bd152
commit 91945e2006
3 files changed
+27 -51

No files matched your search

+5 -14
View File
@@ -2,8 +2,7 @@
/**
* Shared author info bar for single post content.
*
* Prefer explicit $args (third arg of get_template_part).
* Ambient query-var fallback is kept only for residual callers.
* Contract: get_template_part(..., null, $args)
*
* @package AKSRT
*/
@@ -11,18 +10,10 @@
defined('ABSPATH') || exit;
$args = is_array($args ?? null) ? $args : [];
$extra_class = (string) ($args['extra_class'] ?? get_query_var('aksrt_author_bar_class', ''));
$show_actions = array_key_exists('show_actions', $args)
? (bool) $args['show_actions']
: (bool) get_query_var('aksrt_author_bar_actions', false);
$show_bio = array_key_exists('show_bio', $args)
? (bool) $args['show_bio']
: (bool) get_query_var('aksrt_author_bar_bio', false);
$meta_items = array_key_exists('meta_items', $args)
? $args['meta_items']
: get_query_var('aksrt_author_bar_meta_items', []);
$meta_items = is_array($meta_items) ? array_values(array_filter($meta_items, static function ($meta_item) {
$extra_class = (string) ($args['extra_class'] ?? '');
$show_actions = !empty($args['show_actions']);
$show_bio = !empty($args['show_bio']);
$meta_items = is_array($args['meta_items'] ?? null) ? array_values(array_filter($args['meta_items'], static function ($meta_item) {
if (is_array($meta_item)) {
return !empty($meta_item['text']);
}