优化日志
- 优化缓存功能——20220827;
- 优化评论功能,解决部分手机浏览器无法发布评论的问题——20220827;
- 优化首页部分背景图片,压缩并改为本地存储——20220827;
- 启用腾讯云CDN——20220831;
- 删除部分无用插件——20220831;
- 通过自定义插件向
functions.php
添加函数——20220902
- 实现主题升级或更换主题时functions.php内自定义代码不丢失
- 实现
个人说明
部分支持HTML代码
| <?php |
| |
| |
| |
| |
| |
| |
| foreach (array('pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description') as $filter) { |
| remove_filter($filter, 'wp_filter_kses'); |
| } |
| |
| |
| foreach (array('term_description', 'link_description', 'link_notes', 'user_description') as $filter) { |
| remove_filter($filter, 'wp_kses_data'); |
| } |
| ?> |
| *:not([class*="icon"]):not(i) { |
| font-family: Segoe UI, "Microsoft Yahei" !important; |
| } |
- 修改首页元素显示条件,提升PC端及移动端显示效果-20220903
- 通过自定义插件向
functions.php
添加函数,解除大尺寸图片上传限制——20220905
| |
| add_filter( 'big_image_size_threshold', '__return_false' ); |
- 替换代码高亮为highlight.js-20220912
| <link rel="stylesheet" href="/wp-content/highlight/styles/base16/onedark.min.css"> |
| <script src="/wp-content/highlight/highlight.min.js"></script> |
| <script src="/wp-content/highlight/highlightjs-line-numbers/dist/highlightjs-line-numbers.min.js"></script> |
| <script> |
| hljs.initHighlightingOnLoad(); |
| hljs.initLineNumbersOnLoad(); |
| </script> |
| |
| function Bing_paragraph_indentation( $content ){ |
| return str_replace( '<p', '<p style="text-indent:2em;"', $content ); |
| } |
| add_filter( 'the_content', 'Bing_paragraph_indentation' ); |
测试缓存功能对此插件的影响
测试评论功能