WordPress – 修改记录,搬至博客历史。以后一些相关的改变在这记录吧!!!11、
展开收缩
12-18 主题升级至1711 文章添加关注熊掌号
10、
展开收缩
11-18 覆盖升级至4.9.0 替换评论默认表情,覆盖主题smilies文件夹及inc下的[code]smiley.php[/code] 提取密码: [code]t6dy[/code]
09、
展开收缩
8-31 新增评论框提示 打开主题下comments.php,查找“comment-form-comment”,复制以下代码,修改文字内容。
<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>
08、
展开收缩
8-06 自动升级不成功,覆盖升级至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-15df -hal创建 Swap 文件
dd if=/dev/vda1 of=/www/swap bs=1024 count=1500K
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三、添加显示评论者信息,鼠标移动显示和隐藏(试了几遍都不满意,索性就去掉了) PS:备份20170606_111727
// 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 ,未做改动

