|
|
|
|
|
by askonomm
759 days ago
|
|
That would be fine, imo. But seeing as their new development efforts (Block/Gutenberg themes) are also making horrible decisions when they no longer have to (such as putting templating markup inside of HTML comments as JSON)[1] E.g: <!-- wp:latest-posts {"postsToShow":4,"displayPostDate":true} /-->
<div class="posts"></div>
I've lost any faith I had in their core development teams competence. I would understand if development choices made 20 years ago weren't all that great by todays standards, and never breaking backwards compatibility would be the reason it still is bad today, but their new themes can be used independently from their old themes as an entirely different implementation, so they had a chance to finally do what is industry standard, and they chose to again make it horrible to write theme markup code that is prone to errors, has no editor support (what editor supports JSON in HTML comments?) and enforces more spaghetti to be made.[1]: https://developer.wordpress.org/block-editor/getting-started... |
|
They're annotations that indicate where a 'block' of content starts and ends.
The JSON data stores some values set by users for a block that can't easily be parsed from the HTML content.
The content is stored as HTML as most content a user creates is static HTML, so when displaying content much of the HTML is displayed verbatim (but without the HTML comments), and then there's only a little bit of progressive enhancement for dynamic content.
I think you're also conflating some terms, like 'themes' and 'blocks', these are two different things and launched years apart.