feat(widgets): simplify locations and paid sidebar
Remove deprecated widget locations and widgets, standardize sidebar labels, and render a compact paid-post purchase card in the article sidebar.
This commit is contained in:
@@ -100,9 +100,16 @@ if (!function_exists('aksrt_single_build_context')) :
|
||||
$show_pay_box = false;
|
||||
}
|
||||
|
||||
$show_aside = function_exists('aksrt_is_show_sidebar')
|
||||
? aksrt_is_show_sidebar()
|
||||
: false;
|
||||
$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('sidebar-article')
|
||||
|| is_active_sidebar('all_sidebar_bottom');
|
||||
$show_aside = !wp_is_mobile()
|
||||
&& get_post_type($post_id) === 'post'
|
||||
&& $layout !== 'no_sidebar'
|
||||
&& $has_article_widgets;
|
||||
|
||||
return [
|
||||
'post_id' => $post_id,
|
||||
|
||||
Reference in New Issue
Block a user