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

Extend the "Convert to Blocks" feature to add additional functionality

programmeradmin0浏览0评论

We are in the process of migrating over a decade of content on hundreds of sites to the Gutenberg block editor. We had been using lots of custom shortcodes and are developing blocks to replace them.

I would love to perform additional find/replace kind of stuff to convert our old shortcodes to our new block markup when someone click "Convert to Blocks".

For example, I would like "Convert to Blocks" to look for things like [my_custom_shortcode] and replace it with the appropriate custom block markup.

Does WordPress provide any filters or options for adding my own conversion functions to part of the "Convert to Blocks" functionality? or any other ideas to tie into this?

发布评论

评论列表(0)

  1. 暂无评论