feat(widgets): search affix, mod apply, blur_bg, iframe null
Wire search sidebar affix, plate moderator apply entry, user-lists REST blur_bg, and iframe empty via aksrt_get_widget_null.
This commit is contained in:
@@ -109,7 +109,7 @@ class SearchWidget extends \WP_Widget {
|
||||
|
||||
$uid = 'aksrt-sw-' . esc_attr($this->id);
|
||||
?>
|
||||
<div class="widget-search-box aksrt-search-widget search-input" id="<?php echo $uid; ?>">
|
||||
<div class="widget-search-box aksrt-search-widget search-input<?php echo !empty($instance['in_affix']) ? ' is-affix' : ''; ?>" id="<?php echo $uid; ?>"<?php echo !empty($instance['in_affix']) ? ' data-affix="true"' : ''; ?>>
|
||||
<form
|
||||
role="search"
|
||||
method="get"
|
||||
@@ -239,7 +239,8 @@ class SearchWidget extends \WP_Widget {
|
||||
<label><input type="checkbox" name="<?php echo esc_attr($this->get_field_name('show_type')); ?>" value="1" <?php checked(!empty($instance['show_type']) || !isset($instance['show_type'])); ?>> <?php esc_html_e('显示类型切换(≥2 种时)', 'aksrt'); ?></label><br>
|
||||
<label><input type="checkbox" name="<?php echo esc_attr($this->get_field_name('show_input_cat')); ?>" value="1" <?php checked(!empty($instance['show_input_cat'])); ?>> <?php esc_html_e('显示分类筛选', 'aksrt'); ?></label><br>
|
||||
<label><input type="checkbox" name="<?php echo esc_attr($this->get_field_name('show_keywords')); ?>" value="1" <?php checked(!empty($instance['show_keywords'])); ?>> <?php esc_html_e('显示热门关键词', 'aksrt'); ?></label><br>
|
||||
<label><input type="checkbox" name="<?php echo esc_attr($this->get_field_name('show_history')); ?>" value="1" <?php checked(!empty($instance['show_history'])); ?>> <?php esc_html_e('显示搜索历史', 'aksrt'); ?></label>
|
||||
<label><input type="checkbox" name="<?php echo esc_attr($this->get_field_name('show_history')); ?>" value="1" <?php checked(!empty($instance['show_history'])); ?>> <?php esc_html_e('显示搜索历史', 'aksrt'); ?></label><br>
|
||||
<label><input type="checkbox" name="<?php echo esc_attr($this->get_field_name('in_affix')); ?>" value="1" <?php checked(!empty($instance['in_affix'])); ?>> <?php esc_html_e('侧栏随动', 'aksrt'); ?></label>
|
||||
</p>
|
||||
<p>
|
||||
<label><?php esc_html_e('默认类型', 'aksrt'); ?>
|
||||
@@ -298,6 +299,7 @@ class SearchWidget extends \WP_Widget {
|
||||
'keywords' => sanitize_textarea_field((string) ($new_instance['keywords'] ?? '')),
|
||||
'more_but' => sanitize_text_field((string) ($new_instance['more_but'] ?? '')),
|
||||
'more_but_url' => esc_url_raw(trim((string) ($new_instance['more_but_url'] ?? ''))),
|
||||
'in_affix' => !empty($new_instance['in_affix']) ? 1 : 0,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user