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:
2026-08-14 01:49:50 +08:00
parent 51d2ab3aa7
commit bd7d3046a5
43 changed files with 294 additions and 3581 deletions
+10 -3
View File
@@ -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,