Digital Sovereignty for everyone

Generated blocks

When the conversion library meets HTML it has no block for, such as the nested wrappers of a quoted email thread or a description list, it invents a block for it in its own namespace: custom/layout-shell, custom/description-list or custom/collection- followed by a hash. It expects whoever uses it to register those blocks. Nothing on LocalHero did, and the hashed names can’t be registered in advance, so content converted from HTML was saved with blocks WordPress didn’t know. It still displayed, but the editor couldn’t open those parts and the block auditor reported them as missing.

So every conversion to blocks now turns each generated block into a Custom HTML block holding the same HTML, with anything nested inside it folded into that HTML. Pages look exactly as before, and the result opens cleanly in the editor. Content that has no generated blocks is returned untouched.

The namespaces treated this way come from LH_Content_Converter::return_generated_block_namespaces(): the library’s generated_block_namespace option if one was passed, otherwise custom. Filter lh_content_converter_return_generated_block_namespaces to change the list, or return an empty array to keep the generated blocks, for example if your plugin registers them itself.

Content saved before version 2.6.2 keeps its generated blocks.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.