修改

一、时间0点刷新高亮

theme-functions.php

1913-1922行
function cmp_check_if_new_post($hours = 24){
    if($hours == 0) return false;
    global $post;
    $t1=$post->post_date;
    $t2=date("Y-m-d H:i:s");
    $diff=(strtotime($t2)-strtotime($t1))/3600;
    if( $diff < $hours ){
        return true;
    }
}

替换

1913-1931行
function cmp_check_if_new_post($hours = 24){
    if($hours == 0) return false;
    global $post;
    $t1=$post->post_date;
    if($hours > 24){
        $t1=substr($t1,0,10);
        $t2=date("Y-m-d");
        if($t1==$t2){
            return true;
        }
    }
    elseif($hours>0 && $hours<=24){
        $t2=date("Y-m-d H:i:s");
        $diff=(strtotime($t2)-strtotime($t1))/3600;
        if( $diff < $hours ){
            return true;
        }
    }
}

设置date时区

62行
date_default_timezone_set( 'UTC' );

替换

62行
date_default_timezone_set( 'Asia/Shanghai' );

额外CSS

/* 评论错位*/
p.comment-form-cookies-consent {
    padding: 10px 0;
    display: inline-block;
    width: 100%;
}
/*最新栏间隔*/
.two-row .other-news:nth-child(1n+1){margin:0 .5%;}
/* 最新栏错位*/
.two-row-1 .span6 {
 margin-left:0;
}

修改手机显示时间

/*     .news-list li a,.news-list li.most-view a,.other-news a{width:100%;} */
/*     .news-list li span,.other-news span{display:none;} */

存档颜色

/* 488行 */
.entry a{/* color:#09B1B9; */text-decoration:none;}

你可能感兴趣的:(修改)