2017年更改记录

评论3.3K2字数 3104阅读10分20秒阅读模式

 

WordPress – 修改记录,搬至博客历史。以后一些相关的改变在这记录吧!!!文章源自亦枫博客-https://yflad.cn/bulletin/june/

文章源自亦枫博客-https://yflad.cn/bulletin/june/

 文章源自亦枫博客-https://yflad.cn/bulletin/june/

11、

展开收缩
12-18
文章源自亦枫博客-https://yflad.cn/bulletin/june/

主题升级至1711文章源自亦枫博客-https://yflad.cn/bulletin/june/

文章添加关注熊掌号文章源自亦枫博客-https://yflad.cn/bulletin/june/

 文章源自亦枫博客-https://yflad.cn/bulletin/june/

文章源自亦枫博客-https://yflad.cn/bulletin/june/

10、

展开收缩
11-18
文章源自亦枫博客-https://yflad.cn/bulletin/june/

覆盖升级至4.9.0文章源自亦枫博客-https://yflad.cn/bulletin/june/

替换评论默认表情,覆盖主题smilies文件夹及inc下的[code]smiley.php[/code]文章源自亦枫博客-https://yflad.cn/bulletin/june/

提取密码: [code]t6dy[/code]文章源自亦枫博客-https://yflad.cn/bulletin/june/

 文章源自亦枫博客-https://yflad.cn/bulletin/june/

文章源自亦枫博客-https://yflad.cn/bulletin/june/

09、

展开收缩
8-31
文章源自亦枫博客-https://yflad.cn/bulletin/june/

新增评论框提示文章源自亦枫博客-https://yflad.cn/bulletin/june/

打开主题下comments.php,查找“comment-form-comment”,复制以下代码,修改文字内容。文章源自亦枫博客-https://yflad.cn/bulletin/june/

<p class="comment-form-comment"><textarea placeholder="<span style="color: #ff0000;" data-mce-style="color: #ff0000;">欢迎来到亦枫博客,如果有疑问在这里留言</span>" id="comment" name="comment" rows="4" tabindex="1" onKeyDown="xx(this.form.comment,this.form.total,this.form.used,this.form.remain);" onKeyUp="xx(this.form.comment,this.form.total,this.form.used,this.form.remain);"></textarea></p>

 文章源自亦枫博客-https://yflad.cn/bulletin/june/

文章源自亦枫博客-https://yflad.cn/bulletin/june/

08、

展开收缩
8-06
文章源自亦枫博客-https://yflad.cn/bulletin/june/

自动升级不成功,覆盖升级至4.8.1

 

07、

展开收缩
6-19

替换谷歌字体为中科大

加入主题 functions.php

function Koo_google_apis_replace_ustc( $src ){
    $google = array(
        'https://fonts.googleapis.com/',
        'https://ajax.googleapis.com/',
        '//fonts.googleapis.com/',
        '//ajax.googleapis.com/'
    );
    $ustc = array(
        'http://fonts.lug.ustc.edu.cn/',
        'http://ajax.lug.ustc.edu.cn/',
        '//fonts.lug.ustc.edu.cn/',
        '//ajax.lug.ustc.edu.cn/'
    );
    return str_replace( $google, $ustc, $src );
}
add_filter( 'style_loader_src', 'Koo_google_apis_replace_ustc', 16 );
add_filter( 'script_loader_src', 'Koo_google_apis_replace_ustc', 16 );

或者

function Koo_replace_open_sans() {
  wp_deregister_style('open-sans');
  wp_register_style( 'open-sans', '//fonts.lug.ustc.edu.cn/css?family=Open+Sans:300italic,400italic,600italic,300,400,600' );
  if(is_admin()) wp_enqueue_style( 'open-sans');
}
add_action( 'init', 'Koo_replace_open_sans' );

禁用

class Disable_Google_Fonts {
public function __construct() {
add_filter( 'gettext_with_context', array( $this, 'disable_open_sans' ), 888, 4 );
}
public function disable_open_sans( $translations, $text, $context, $domain ) {
if ( 'Open Sans font: on or off' == $context && 'on' == $text ) {
$translations = 'off';
}
return $translations;
}
}
$disable_google_fonts = new Disable_Google_Fonts;
function coolwp_remove_open_sans_from_wp_core() {
    wp_deregister_style( 'open-sans' );
    wp_register_style( 'open-sans', false );
    wp_enqueue_style('open-sans','');
}
add_action( 'init', 'coolwp_remove_open_sans_from_wp_core' );

 

06、

展开收缩
6-13

(1)修改blockquote,使摘要看起来更美观

 

07、

展开收缩
6-15

(1)增加SWAP(虚拟内存)(8月7日取消)

查看路径和是否有足够的空间:

df -hal

创建 Swap 文件

dd if=/dev/vda1 of=/www/swap bs=1024 count=1500K

2017年更改记录

 

05、

展开收缩
6-12

(1)百度认证HTTPS

(2)360网站检测100分彻底解决360网站提示的漏洞

(3)开启CDN的HTTP/2腾讯云开启CDN HTTP2.0配置

 

04、

展开收缩
6-11

(1)WordPress4.8回滚至4.7.4

PS:第二天又被自动升级到4.7.5

 

03、

展开收缩
6-09

(1)WordPress升级至4.8

PS:备份20170609_103750

 

02、

展开收缩
6-06

(1)全站启用HTTPS协议

相关文章:WordPress搭配腾讯云SSL启用全站HTTPS

WordPress启用全站SSL(配置腾讯云CDN)

PS:备份20170606_192623

(2)发布文章自动清理

(3)解决百度分享不能用的问题

替换原百度分享链接

相关文章:开启SSL后,百度分享无法使用解决办法

 

01、

展开收缩
6-04

(1)修改评论Admin

文件目录 begin/inc/function/function.php

// admin
function get_author_admin($comment_author_email,$user_id){
	global $wpdb;
	$author_count = count($wpdb->get_results(
	"SELECT comment_ID as author_count FROM $wpdb->comments WHERE comment_author_email = '$comment_author_email' "));
	$adminEmail = get_option('admin_email');if($comment_author_email ==$adminEmail) echo '<span class="author-admin">博主</span>';
}

(2) 重新安装高亮插件

去掉以前优化后的版本,重新安装 Crayon Syntax Highlighter ,未做改动

三、添加显示评论者信息,鼠标移动显示和隐藏(试了几遍都不满意,索性就去掉了)

PS:备份20170606_111727

 

 

 

扫扫关注公众号
weinxin
我的微信
扫扫体验小程序
weinxin
我的公众号
亦枫
  • 本文由 发表于 2017年6月4日 23:40:35
评论  0  访客  0
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定