refactor: 规范化 PHP 模板文件

- header.php: 修复箭头操作符空格, 移除多余空行 (1520 -> 1481 行)
- footer.php: 修复箭头操作符空格, 移除多余空行 (177 -> 168 行)
- sidebar.php: 修复箭头操作符空格, 移除多余空行 (1311 -> 1288 行)
- single.php: 修复箭头操作符空格, 移除多余空行 (214 -> 196 行)
- comments.php: 修复箭头操作符空格
- search.php: 修复箭头操作符空格
This commit is contained in:
2026-01-16 11:26:33 +08:00
parent 233edd2441
commit 733722e7d4
6 changed files with 66 additions and 157 deletions

View File

@@ -20,7 +20,7 @@
if ($filter_type[0] == '*'){ $filter_type = substr($filter_type, 1); }
$checked = in_array($filter_type, $current_filters_type);
if (isset($all_post_types[$filter_type])){
$filter_name = $all_post_types[$filter_type] -> labels -> name;
$filter_name = $all_post_types[$filter_type]->labels->name;
?>
<div class="custom-control custom-checkbox search-filter-wrapper">
<input class="custom-control-input search-filter" name="<?php echo $filter_type; ?>" id="search_filter_<?php echo $filter_type; ?>" type="checkbox" <?php echo $checked ? 'checked="true"' : ''; ?>>
@@ -38,7 +38,7 @@
<?php } ?>
<p class="text-black mt-3 mb-0 opacity-8">
<i class="fa fa-file-o mr-1"></i>
<?php global $wp_query; echo $wp_query -> found_posts; ?> <?php _e('个结果', 'argon');?>
<?php global $wp_query; echo $wp_query->found_posts; ?> <?php _e('个结果', 'argon');?>
</p>
</div>
</div>