-
Notifications
You must be signed in to change notification settings - Fork 586
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from mashirozx/dev
update to v3.3.9
- Loading branch information
Showing
20 changed files
with
1,821 additions
and
1,829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -424,7 +424,7 @@ function akina_comment_format($comment, $args, $depth) | |
</div> | ||
<?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));?> | ||
<div class="right"> | ||
<div class="info"><time datetime="<?php comment_date('Y-m-d');?>"><?php echo poi_time_since(strtotime($comment->comment_date_gmt), true); //comment_date(get_option('date_format')); ?></time><?php echo siren_get_useragent($comment->comment_agent); ?><?php echo mobile_get_useragent_icon($comment->comment_agent); ?> <?php _e('Location', 'sakura'); /*来自*/?>: <?php echo convertip(get_comment_author_ip()); ?> | ||
<div class="info"><time datetime="<?php comment_date('Y-m-d');?>"><?php echo poi_time_since(strtotime($comment->comment_date_gmt), true); //comment_date(get_option('date_format')); ?></time><?php echo siren_get_useragent($comment->comment_agent); ?><?php echo mobile_get_useragent_icon($comment->comment_agent); ?> <?php if(akina_option('open_location')){ _e('Location', 'sakura'); /*来自*/?>: <?php echo convertip(get_comment_author_ip());} ?> | ||
<?php if (current_user_can('manage_options') and (wp_is_mobile() == false)) { | ||
$comment_ID = $comment->comment_ID; | ||
$i_private = get_comment_meta($comment_ID, '_private', true); | ||
|
@@ -801,7 +801,7 @@ function custom_login() | |
//echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('template_directory') . '/inc/login.css" />'."\n"; | ||
echo '<link rel="stylesheet" type="text/css" href="' . get_template_directory_uri() . '/inc/login.css?' . SAKURA_VERSION . '" />' . "\n"; | ||
//echo '<script type="text/javascript" src="'.get_bloginfo('template_directory').'/js/jquery.min.js"></script>'."\n"; | ||
echo '<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/jquery/jquery@1.8.2/jquery.min.js"></script>' . "\n"; | ||
echo '<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/jquery/jquery@1.9.0/jquery.min.js"></script>' . "\n"; | ||
} | ||
|
||
add_action('login_head', 'custom_login'); | ||
|
@@ -969,11 +969,11 @@ function comment_mail_notify($comment_id) | |
<h3>您有一条来自<a style="text-decoration: none;color: orange " target="_blank" href="' . home_url() . '/">' . get_option("blogname") . '</a>的回复</h3> | ||
<br> | ||
<p style="font-size: 14px;">您在文章《' . get_the_title($comment->comment_post_ID) . '》上发表的评论:</p> | ||
<p style="border-bottom:#ddd 1px solid;border-left:#ddd 1px solid;padding-bottom:20px;background-color:#eee;margin:15px 0px;padding-left:20px;padding-right:20px;border-top:#ddd 1px solid;border-right:#ddd 1px solid;padding-top:20px">' | ||
. trim(get_comment($parent_id)->comment_content) . '</p> | ||
<div style="border-bottom:#ddd 1px solid;border-left:#ddd 1px solid;padding-bottom:20px;background-color:#eee;margin:15px 0px;padding-left:20px;padding-right:20px;border-top:#ddd 1px solid;border-right:#ddd 1px solid;padding-top:20px">' | ||
. trim(get_comment($parent_id)->comment_content) . '</div> | ||
<p style="font-size: 14px;">' . trim($comment->comment_author) . ' 给您的回复如下:</p> | ||
<p style="border-bottom:#ddd 1px solid;border-left:#ddd 1px solid;padding-bottom:20px;background-color:#eee;margin:15px 0px;padding-left:20px;padding-right:20px;border-top:#ddd 1px solid;border-right:#ddd 1px solid;padding-top:20px">' | ||
. trim($comment->comment_content) . '</p> | ||
<div style="border-bottom:#ddd 1px solid;border-left:#ddd 1px solid;padding-bottom:20px;background-color:#eee;margin:15px 0px;padding-left:20px;padding-right:20px;border-top:#ddd 1px solid;border-right:#ddd 1px solid;padding-top:20px">' | ||
. trim($comment->comment_content) . '</div> | ||
<div style="text-align: center;"> | ||
<img src="https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/other/hr.png" alt="hr" style="width:100%; | ||
|
@@ -1762,16 +1762,6 @@ function DEFAULT_FEATURE_IMAGE() | |
return rest_url('sakura/v1/image/feature') . '?' . rand(1, 1000); | ||
} | ||
|
||
//防止设置置顶文章造成的图片同侧bug | ||
add_action( 'pre_get_posts', function( $q ){ | ||
if ( $q->is_home() && $q->is_main_query() ){ | ||
$q->set( 'posts_per_page', 10 - sizeof(get_option( 'sticky_posts' )) ); | ||
if ( $q->get( 'paged' ) > 1 ) | ||
$q->set( 'post__not_in', get_option( 'sticky_posts' ) ); | ||
} | ||
|
||
}); | ||
|
||
//评论回复 | ||
function sakura_comment_notify($comment_id) | ||
{ | ||
|
@@ -1817,6 +1807,7 @@ function markdown_parser($incoming_comment) | |
return $incoming_comment; | ||
} | ||
add_filter('preprocess_comment', 'markdown_parser'); | ||
remove_filter( 'comment_text', 'make_clickable', 9 ); | ||
|
||
//保存Markdown评论 | ||
function save_markdown_comment($comment_ID, $comment_approved) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,8 @@ function font_end_js_control() { ?> | |
mashiro_option.skin_bg7 = "https://cdn.jsdelivr.net/gh/moezx/[email protected]/other-sites/api-index/images/me.png"; | ||
<?php } ?> | ||
|
||
mashiro_option.darkmode = <?php if ( akina_option('darkmode') ){ echo 'true'; } else { echo 'false'; } ?>; | ||
|
||
<?php if( is_home() ){ ?> | ||
mashiro_option.land_at_home = true; | ||
<?php }else {?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.