feat(widgets): complete phase 3 atomic integration
This commit is contained in:
1 parent
7c3f4221fe
commit
d5dfeb7102
89 files changed
+843
-12886
No files matched your search
@@ -63,7 +63,7 @@ if (!function_exists('aksrt_single_render_aside')) :
|
||||
// from an otherwise two-column article page.
|
||||
|
||||
$has_article_widgets = is_active_sidebar('all_sidebar_top')
|
||||
|| is_active_sidebar('sidebar-article')
|
||||
|| is_active_sidebar('single_sidebar')
|
||||
|| is_active_sidebar('all_sidebar_bottom');
|
||||
?>
|
||||
<div class="aksrt-article-sidebar" role="complementary" aria-label="<?php esc_attr_e('侧栏', 'aksrt'); ?>">
|
||||
@@ -85,8 +85,8 @@ if (!function_exists('aksrt_single_render_aside')) :
|
||||
<?php if (is_active_sidebar('all_sidebar_top')) : ?>
|
||||
<?php dynamic_sidebar('all_sidebar_top'); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (is_active_sidebar('sidebar-article')) : ?>
|
||||
<?php dynamic_sidebar('sidebar-article'); ?>
|
||||
<?php if (is_active_sidebar('single_sidebar')) : ?>
|
||||
<?php dynamic_sidebar('single_sidebar'); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (is_active_sidebar('all_sidebar_bottom')) : ?>
|
||||
<?php dynamic_sidebar('all_sidebar_bottom'); ?>
|
||||
|
||||
@@ -104,7 +104,7 @@ if (!function_exists('aksrt_single_build_context')) :
|
||||
? aksrt_get_post_show_layout($post_id)
|
||||
: '';
|
||||
$has_article_widgets = is_active_sidebar('all_sidebar_top')
|
||||
|| is_active_sidebar('sidebar-article')
|
||||
|| 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
|
||||
|
||||
@@ -23,7 +23,7 @@ if (!function_exists('aksrt_resolve_sidebar_id')):
|
||||
*/
|
||||
function aksrt_resolve_sidebar_id(): string {
|
||||
if (is_single()) {
|
||||
return 'sidebar-article';
|
||||
return 'single_sidebar';
|
||||
}
|
||||
|
||||
if (is_category()) {
|
||||
@@ -39,7 +39,7 @@ function aksrt_resolve_sidebar_id(): string {
|
||||
}
|
||||
|
||||
if (is_author()) {
|
||||
return 'author-sidebar';
|
||||
return '';
|
||||
}
|
||||
|
||||
if (is_page()) {
|
||||
|
||||
@@ -29,7 +29,7 @@ if (!function_exists('aksrt_homepage_render_layout')) {
|
||||
|
||||
// Fluid zones live outside <main>, once only (removed from header.php).
|
||||
aksrt_homepage_render_widget_zone(
|
||||
['all_top_fluid', 'home_top_fluid'],
|
||||
['home_top_fluid'],
|
||||
'fluid-widget-wrap aksrt-homepage__fluid-zone aksrt-homepage__fluid-zone--top'
|
||||
);
|
||||
?>
|
||||
@@ -142,7 +142,7 @@ if (!function_exists('aksrt_homepage_render_layout')) {
|
||||
</main>
|
||||
<?php
|
||||
aksrt_homepage_render_widget_zone(
|
||||
['home_bottom_fluid', 'all_bottom_fluid'],
|
||||
['home_bottom_fluid'],
|
||||
'fluid-widget-wrap aksrt-homepage__fluid-zone aksrt-homepage__fluid-zone--bottom'
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user