fix: WP_Embed::autoembed for Gutenberg (#299)

pull/331/head
Seaton Jiang 2020-10-26 09:19:45 +08:00
parent 3d30d6ac0f
commit ea8ff4c6ee
No known key found for this signature in database
GPG Key ID: C1086BAE716FF138
2 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
* 文章相关函数
* @author Seaton Jiang <seaton@vtrois.com>
* @license MIT License
* @version 2020.06.13
* @version 2020.10.26
*/
// 文章链接添加 target 和 rel
@ -365,6 +365,9 @@ if (!kratos_option('g_gutenberg',false)) {
{
wp_dequeue_style('wp-block-library');
}
// 禁用 Auto Embeds
remove_filter('the_content', array($GLOBALS['wp_embed'], 'autoembed'), 8);
}
// 文章评论增强

View File

@ -3,7 +3,7 @@
* 核心函数
* @author Seaton Jiang <seaton@vtrois.com>
* @license MIT License
* @version 2020.08.04
* @version 2020.10.26
*/
if (kratos_option('g_cdn', false)) {
@ -163,9 +163,6 @@ add_filter('style_loader_src', function ($href) {
return false;
});
// 禁用 Auto Embeds
remove_filter('the_content', array($GLOBALS['wp_embed'], 'autoembed'), 8);
// 替换国内 Gravatar 源
function get_https_avatar($avatar)
{