最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to force gutenberg to reload blocks after saving

programmeradmin4浏览0评论

I have a use case in which I am replacing post_content in wp_insert_post_data (i.e. replacing swear words), which I prefer to do in PHP.

While saving works, in gutenberg replacements are only visible after page reload.

Also tried hooking into filter rest_pre_insert_{$this->post_type} and data was properly returned in ajax request, but gutenberg editor still didn't update blocks content.

Any ideas how to achieve that?

发布评论

评论列表(0)

  1. 暂无评论