diff --git a/ChangeLog b/ChangeLog index 28386f7..7025caa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +=== versino 0.4.1 === + +* 修复: 新增主题选项默认值无效; +* 增加: 新增文章结尾标记选项, 默认为'## End Post ##'; +* 修复: 相关文章插件未安装时主题出错; +* 增加: 新增评论分页导航; + === version 0.4.0 === * first released version diff --git a/comments.php b/comments.php index 994e840..2e79cf6 100644 --- a/comments.php +++ b/comments.php @@ -32,6 +32,7 @@
+ 'dangopress_comments_callback', 'type' => 'comment', 'max_depth' => 30)); ?> - + +
+
+ 旧评论'); ?> + '); ?> +
+
+ +
@@ -80,7 +89,7 @@
  • - +
  • diff --git a/functions.php b/functions.php index c6cf5b3..a2ec1d2 100644 --- a/functions.php +++ b/functions.php @@ -201,29 +201,22 @@ function dangopress_esc_callback($matches) add_filter('the_content', 'dangopress_esc_html', 2); add_filter('comment_text', 'dangopress_esc_html', 2); -/** - * Custom pagination function +/* + * Retrieve paginated link for archive post pages */ -function dangopress_pagination() +function dangopress_paginate_links() { global $wp_query; $total = $wp_query->max_num_pages; $big = 999999999; // need an unlikely integer - if ( $total > 1) { - if (get_option('permalink_structure')) { - $format = 'page/%#%/'; - } else { - $format = '&paged=%#%'; - } - + if ($total > 1) { echo paginate_links(array( - 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), - 'format' => $format, + 'base' => str_replace($big, '%_%', esc_url(get_pagenum_link($big))), + 'format' => '%#%', 'current' => max(1, get_query_var('paged')), 'total' => $total, - 'mid_size' => 2, 'prev_text' => '', 'next_text' => '', )); @@ -309,8 +302,10 @@ function dangopress_get_most_commented($posts_num = 10, $days = 60, $chars = 30) */ function dangopress_add_end_mark($content) { + $options = get_option('dangopress_options'); + if (is_singular()) { - return $content . '## End ##'; + return $content . $options['post_end_mark']; } else { return $content; } diff --git a/index.php b/index.php index 6b77763..acad00c 100644 --- a/index.php +++ b/index.php @@ -52,6 +52,6 @@
    -
    +
    diff --git a/single.php b/single.php index 7627316..2786f48 100644 --- a/single.php +++ b/single.php @@ -28,7 +28,7 @@ - +