wordpress - 是否可以以编程方式更新 ACF Wysiwyg 字段?
问题描述
我必须从 php 更新 ACF Wysiwyg 字段。我想将渲染(从另一个所见即所得字段渲染)内容插入到该字段中。
update_field()
不适用于所见即所得的领域。有没有其他解决方案?
我无法更改字段类型。
解决方案
您需要使用html_entity_decode
. 就是这样;
update_post_meta($postid, 'key', html_entity_decode('HTML HERE'));
推荐阅读
- linux - Pip 没有链接到我升级的 Python 版本。包 python3-pip 不可用,但被另一个包引用
- python - 无法安装 pip (python 3.7.4)。它没有与python一起安装。get-pip.py 也不起作用
- javascript - 使用 fullcalendar.js 如何在日历的每个空单元格上显示时段开始时间?
- c++ - arcsin 和 arccos 通常是如何实现的?
- java - 迭代整数列表并计算差异(java)
- javascript - 如何在 React 中循环遍历 Firebase JSON
- c# - 使用php hash和salt登录时密码错误
- ios - 如何处理来自图像选择器的视频?
- angular - Ngx-Datatable 不会显示通过 Ajax 检索到的行数据,除非触发了鼠标悬停或鼠标离开事件
- r - 从字符串中提取匹配模式