主题函数修改记录
删除themes-widgets.php/ function lastest_comments
中
<div class="avatar float-left">' . get_avatar($comment, 60) . '</div>
删除page-content.php/float-left d-block
中
<?php } if (kratos_option('g_post_loves', true)) { ?>
<span class="mr-2"><i class="kicon i-good"></i><?php if (get_post_meta($post->ID, 'love', true)) { echo get_post_meta($post->ID, 'love', true); } else { echo '0'; } _e('人点赞', 'kratos'); ?></span>
删除 page-toolbar.php
中全部内容(作者简介,点赞)
在single.php
中将header
中内容替换为
<div class="header">
<h1 class="title"><?php the_title(); ?></h1>
<div class="meta">
<span><?php echo get_the_date(); ?></span>
<span><?php echo get_the_author_meta('display_name'); ?></span>
<?php if (current_user_can('edit_posts')) {
echo '<span>';
edit_post_link(__('编辑文章', 'kratos'));
echo '</span>';
}; ?>
</div>
</div>
删除 comments.php
第45行开始的内容(评论者邮箱,网址)
<div class="col-md-6 mt-3 mt-md-0 comment-form-email">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="kicon i-cemail"></i></span>
</div>
<input id="email" class="form-control" name="email" placeholder="<?php _e('邮箱', 'kratos'); ?>" type="email" value="<?php echo esc_attr($commenter['comment_author_email']); ?>">
</div>
</div>
<div class="col-md-6 mt-3 comment-form-author">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="kicon i-url"></i></span>
</div>
<input class="form-control" id="author" placeholder="<?php _e('网址', 'kratos'); ?>" name="url" type="url" value="<?php echo esc_attr($commenter['comment_author_url']); ?>">
</div>
</div>
删除comments.php\comments
第16行开始以下内容:
<h3 class="title"><?php if (is_single()) {
_e('文章评论', 'kratos');
} else {
_e('评论内容', 'kratos');
} ?></h3>
<div class="list">
删除footer.php
第48行开始内容:
echo '<p>Theme <a href="https://github.com/seatonjiang/kratos" target="_blank" rel="nofollow">Kratos</a> Made By <a href="https://seatonjiang.com" target="_blank" rel="nofollow">Seaton Jiang</a></p>';
覆盖全部page-content
(移动端显示时间和评论)
<?php
/**
* 文章列表
* @author Seaton Jiang <seatonjiang@vtrois.com>
* @license GPL-3.0 License
* @version 2021.08.21
*/
?>
<div class="article-panel">
<?php if (kratos_option('g_thumbnail',true)) { ?>
<div class="a-thumb">
<a href="<?php the_permalink(); ?>">
<?php post_thumbnail(); ?>
</a>
</div>
<?php }?>
<div class="a-post <?php if (!kratos_option('g_thumbnail',true)) { echo 'a-none'; } ?>">
<div class="header">
<?php
$category = get_the_category();
if ($category) {
echo '<a class="label" href="'. get_category_link($category[0]->term_id) . '">' . $category[0]->cat_name . '<i class="label-arrow"></i></a>';
} else {
echo '<span class="label">'. __('页面','kratos') .'<i class="label-arrow"></i></span>';
}
?>
<h3 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
</div>
<div class="content">
<p><?php echo wp_trim_words(get_the_excerpt(), 260); ?></p>
</div>
</div>
<div class="a-meta">
<span class="float-left d-none d-md-block">
</span>
<span class="float-left d-block">
<span class="mr-2"><i class="kicon i-calendar"></i><?php echo get_the_date('Y-m-d'); ?></span>
<span class="mr-2"><i class="kicon i-author"></i><?php echo get_the_author_meta('display_name'); ?></span>
<span class="mr-2"><i class="kicon i-comments"></i><?php comments_number('0', '1', '%'); _e('', 'kratos'); ?></span>
</span>
<span class="float-right">
<a href="<?php the_permalink(); ?>"><?php _e('展开', 'kratos'); ?><i class="kicon i-rightbutton"></i></a>
</span>
</div>
</div>
插件修改记录
civil-footnote
删除了((*))
的表达(保留了<footnote>*</footnote>
),具体在namespace.php
第111行
'/\s?(?:\(\(|<footnote>)(.*)(?:\)\)|<\/footnote>)/Us',
中删除了\(\(|...\)\)|
。至于能否修改返回箭头,暂时未找到相关代码。