html - Oxwall - 删除元标记
问题描述
如何删除 Oxwall 软件或任何软件中的元标记。Oxwall 核心加载自动错误的 Facebook 元标记。
错误值(由 Oxwall 生成):
<meta name="og:type" content="website" />
正确值:
<meta property="og:type" content="website" />
提前致谢
解决方案
您可以在基本或插件 init.php 文件中包含以下行。如果您不使用插件,请打开 /ow_system_plugins/base/init.php 并添加以下代码:
function modify_custom_meta_property(){
OW::getDocument()->addMetaInfo('og:type', 'website', 'property');
}
OW::getEventManager()->bind(OW_EventManager::ON_BEFORE_DOCUMENT_RENDER, 'modify_custom_meta_property');
推荐阅读
- c# - Selenium - 循环遍历元素检查集合是否有值
- javascript - 奥赛罗有效移动算法不起作用javascript
- spring-boot - JdbcTemplate 有什么方法代替 try-catch 块?
- powershell - 为了使用 powershell 重置 MFA,我的用户应该具有什么角色?
- routes - HERE标准项目为什么要空地图?
- c# - 试图在 url 中传递 base64url 编码的令牌,但它一直失败
- c# - 返回列表的前 50%,同时在对象属性之间平均拆分行
- django - django - 在创建视图中迭代模型并返回内联表单集
- laravel-backpack - 会话语言环境背包
- python-3.x - 创建子类的对象时出现问题