fix(frontend): align layouts posts and widgets with zibll

This commit is contained in:
2026-08-17 21:47:40 +08:00
parent 526364b438
commit 5d45eb053b
27 changed files with 3222 additions and 2777 deletions
+1 -4
View File
@@ -103,15 +103,12 @@ if (!function_exists('aksrt_single_build_context')) :
$layout = function_exists('aksrt_get_post_show_layout')
? aksrt_get_post_show_layout($post_id)
: '';
$has_article_widgets = is_active_sidebar('all_sidebar_top')
|| is_active_sidebar('single_sidebar')
|| is_active_sidebar('all_sidebar_bottom');
// Do not use wp_is_mobile() as a layout gate. It is User-Agent based and
// can disagree with the actual viewport (for example, desktop-mode mobile
// browsers). The responsive stylesheet owns narrow-screen hiding.
$show_aside = get_post_type($post_id) === 'post'
&& $layout !== 'no_sidebar'
&& $has_article_widgets;
&& (!function_exists('aksrt_is_show_sidebar') || aksrt_is_show_sidebar());
return [
'post_id' => $post_id,