Make WordPress Core


Ignore:
Timestamp:
12/13/2018 06:11:10 PM (6 years ago)
Author:
desrosj
Message:

Blocks: Parse blocks when displaying posts.

Posts containing blocks are now correctly handled when displaying on the front end, including dynamic blocks and nested blocks.

Props pento.

Merges [43752] to trunk.

See #45109.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tests/phpunit/data/blocks/fixtures/core__column.parsed.json

    r43751 r44118  
    44        "attrs": {},
    55        "innerBlocks": [
     6            {
     7                "blockName": null,
     8                "attrs": {},
     9                "innerBlocks": [],
     10                "innerHTML": "\n<div class=\"wp-block-column\">\n\t"
     11            },
    612            {
    713                "blockName": "core/paragraph",
     
    1016                "innerHTML": "\n\t<p>Column One, Paragraph One</p>\n\t"
    1117            },
     18            {
     19                "blockName": null,
     20                "attrs": {},
     21                "innerBlocks": [],
     22                "innerHTML": "\n\t"
     23            },
    1224            {
    1325                "blockName": "core/paragraph",
     
    1527                "innerBlocks": [],
    1628                "innerHTML": "\n\t<p>Column One, Paragraph Two</p>\n\t"
    17             }
    18         ],
    19         "innerHTML": "\n<div class=\"wp-block-column\">\n\t\n\t\n</div>\n"
     29            },
     30            {
     31                "blockName": null,
     32                "attrs": {},
     33                "innerBlocks": [],
     34                "innerHTML": "\n</div>\n"
     35            }
     36        ],
     37        "innerHTML": ""
    2038    },
    2139    {
Note: See TracChangeset for help on using the changeset viewer.