Commit Graph

2 Commits

Author SHA1 Message Date
Gary Pendergast
28310289bd Blocks: Introduce register_block_type(), unregister_block_type(), and get_dynamic_blocks() functions.
These helper functions allow easy access to the global block registry.

See #45109.


Built from https://develop.svn.wordpress.org/branches/5.0@43743


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 01:53:26 +00:00
Gary Pendergast
22840639e8 Blocks: Introduce WP_Block_Type and WP_Block_Type_Registry classes.
These are the foundational classes allowing blocks to be registered and used throughout WordPress.

This commit also includes the `has_block()` and `has_blocks()` functions, which are required for unit testing these classes.

Props adamsilverstein, danielbachhuber, desrosj.
See #45097, #45109.


Built from https://develop.svn.wordpress.org/branches/5.0@43742


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 01:31:26 +00:00