feat(frontend): adopt zibll site-layout-1/2/3 float dual-column system
Wire settings-driven sidebar visibility and body site-layout classes, replace content-layout CSS grid with Zibll float geometry, move sidebar DOM to content-wrap sibling across single/archive/page/home, and add post meta show_layout overrides.
This commit is contained in:
1 parent
232b6eb752
commit
12673fb819
15 files changed
+354
-168
No files matched your search
@@ -176,6 +176,21 @@ class AKSRT_Post_Meta_Box {
|
||||
<option value="mini" <?php selected($meta['layout_override'], 'mini'); ?>><?php esc_html_e('迷你', 'aksrt'); ?></option>
|
||||
</select>
|
||||
|
||||
<p><strong><?php esc_html_e('侧栏布局(Zibll show_layout)', 'aksrt'); ?></strong></p>
|
||||
<?php
|
||||
$show_layout = (string) get_post_meta($post->ID, '_aksrt_show_layout', true);
|
||||
if (!in_array($show_layout, ['no_sidebar', 'sidebar_left', 'sidebar_right'], true)) {
|
||||
$show_layout = '';
|
||||
}
|
||||
?>
|
||||
<select name="aksrt_show_layout" class="widefat">
|
||||
<option value="" <?php selected($show_layout, ''); ?>><?php esc_html_e('跟随全局', 'aksrt'); ?></option>
|
||||
<option value="no_sidebar" <?php selected($show_layout, 'no_sidebar'); ?>><?php esc_html_e('无侧栏', 'aksrt'); ?></option>
|
||||
<option value="sidebar_right" <?php selected($show_layout, 'sidebar_right'); ?>><?php esc_html_e('右侧栏', 'aksrt'); ?></option>
|
||||
<option value="sidebar_left" <?php selected($show_layout, 'sidebar_left'); ?>><?php esc_html_e('左侧栏', 'aksrt'); ?></option>
|
||||
</select>
|
||||
<p class="description"><?php esc_html_e('覆盖全局侧栏开关与左右位置,仅影响本文/本页。', 'aksrt'); ?></p>
|
||||
|
||||
<p><strong><?php esc_html_e('头图模式', 'aksrt'); ?></strong></p>
|
||||
<select name="aksrt_post_meta[header_image_mode]" class="widefat">
|
||||
<option value="" <?php selected($meta['header_image_mode'], ''); ?>><?php esc_html_e('跟随全局', 'aksrt'); ?></option>
|
||||
@@ -349,6 +364,17 @@ class AKSRT_Post_Meta_Box {
|
||||
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;
|
||||
if (!current_user_can('edit_post', $post_id)) return;
|
||||
|
||||
// Zibll show_layout (independent of list layout_override).
|
||||
$show_layout = isset($_POST['aksrt_show_layout']) ? sanitize_key((string) wp_unslash($_POST['aksrt_show_layout'])) : '';
|
||||
if (!in_array($show_layout, ['no_sidebar', 'sidebar_left', 'sidebar_right'], true)) {
|
||||
$show_layout = '';
|
||||
}
|
||||
if ($show_layout !== '') {
|
||||
update_post_meta($post_id, '_aksrt_show_layout', $show_layout);
|
||||
} else {
|
||||
delete_post_meta($post_id, '_aksrt_show_layout');
|
||||
}
|
||||
|
||||
// §3.8 Quick / Bulk edit — separate code path (merge mode)
|
||||
if (!empty($_POST['aksrt_qe_flag'])) {
|
||||
$this->save_quick_edit($post_id);
|
||||
|
||||
Reference in new issue
Block a user