如何删除作者标记在Discord的预览中不可见? [英] How to remove Author Tag from being visible in Discord's previews?

查看:126
本文介绍了如何删除作者标记在Discord的预览中不可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与Discord分享帖子时,Discord生成的预览显示作者姓名和URL。我们删除了有关作者的所有信息,但并没有阻止显示作者标签。

When sharing a post to Discord, the preview Discord generates shows the author name and URL. We removed all information about the author but it didn't stop the author tag from showing.

推荐答案

这是通过oEmbed完成的。在您的functions.php文件中添加以下代码

That’s done via oEmbed. Add below code in your functions.php file

add_filter( 'oembed_response_data', 'disable_embeds_filter_oembed_response_data_' );
function disable_embeds_filter_oembed_response_data_( $data ) {
    unset($data['author_url']);
    unset($data['author_name']);
    return $data;
}

** disorc可能已将响应存储在缓存中,因此创建新的帖子或页面并测试**

**disorc may have stored the response in cache so create new post or page and test that **

这篇关于如何删除作者标记在Discord的预览中不可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆