This command would search through posts and list all blocks that are used in any post.
These would result into table with block name and amount of uses.
Also returning example pages where block is used would be useful.
Base command:
You should be also able to limit post type:
wp block type stats --post-type=page
The command wp post list includes example implementation of passing query arguments, return fields and format so it's good benchmark for this.
Use case: Review what blocks are in use and what are not. Useful when migrating old blocks into new and making sure obsolete blocks are safe to be removed.
This is complementary for #212 but both are useful.
This command would search through posts and list all blocks that are used in any post.
These would result into table with block name and amount of uses.
Also returning example pages where block is used would be useful.
Base command:
You should be also able to limit post type:
The command
wp post listincludes example implementation of passing query arguments, return fields and format so it's good benchmark for this.Use case: Review what blocks are in use and what are not. Useful when migrating old blocks into new and making sure obsolete blocks are safe to be removed.
This is complementary for #212 but both are useful.