This PR is meant to introduce the concept of a filter to the rest endpoint. This can act as an allow list or a block list for the block types allowed in a post. Only the allow list or block list is allowed in for filtering purposes.
Steps to Test
Spin up an env using wp-env start
Call https://localhost:8888/wp-json/vip-block-data-api/v1/posts/1/blocks?skip_blocks=core/paragraph to get an empty result
Call https://localhost:8888/wp-json/vip-block-data-api/v1/posts/1/blocks?include_blocks=core/paragraph to get the usual result
TODO
Add a test
Update the readme with this new filter
Just want to get an initial approval on the design and then I'll bake that in.
Description
This PR is meant to introduce the concept of a filter to the rest endpoint. This can act as an allow list or a block list for the block types allowed in a post. Only the allow list or block list is allowed in for filtering purposes.
Steps to Test
wp-env start
https://localhost:8888/wp-json/vip-block-data-api/v1/posts/1/blocks?skip_blocks=core/paragraph
to get an empty resulthttps://localhost:8888/wp-json/vip-block-data-api/v1/posts/1/blocks?include_blocks=core/paragraph
to get the usual resultTODO
Just want to get an initial approval on the design and then I'll bake that in.