Skip to content

Allow matching blocks before or after a given block #14

@dlh01

Description

@dlh01

Description

Inspired by the internal use case given here: https://l.alley.dev/7682a06198

The before and after parameters might accept an array of match_block() parameters, like

'before' => [ 'name' => 'my-plugin/my-custom-block' ],
'after' => [ 'with_innerhtml' => 'Get the whole story' ]

Use Case

As a developer, I want to be able to match the blocks in post content before or after a given block so that I can deliver the two halves of content in separate properties to a third-party application that composes the results in its own way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions