mirror of https://github.com/vtrois/kratos
fix: WP_Embed::autoembed for Gutenberg (#299)
parent
3d30d6ac0f
commit
ea8ff4c6ee
|
@ -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);
|
||||
}
|
||||
|
||||
// 文章评论增强
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue