小编use*_*473的帖子

从 WordPress oembed json 链接中删除author和author_url

我注意到 WordPress 在标题中生成了 2 个链接。它们包含一些 oembed 参数。

这看起来像这样:

<link rel="alternate" type="application/json+oembed" href="......">
<link rel="alternate" type="text/xml+oembed" href=".......">

{
      "version": "1.0",
      "provider_name": "Website Name",
      "provider_url": "http://example.com",
      "author_name": "admin",
      "author_url": "http://example.com/author/admin/",
      "title": "",
      "type": "rich",
      "width": 600,
      "height": 338,
      "html": "long string of html"
    }
Run Code Online (Sandbox Code Playgroud)

我知道我可以禁用这些链接,但我想保留它们并仅删除author_name 和author_url。

我有办法做到这一点吗?

我希望你能帮忙。

谢谢。

wordpress oembed

4
推荐指数
1
解决办法
2394
查看次数

标签 统计

oembed ×1

wordpress ×1