修改

一、時間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;
        }
    }
}

設(shè)置date時區(qū)

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;}
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容