fix(frontend): align layouts posts and widgets with zibll
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user