mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-28 09:14:28 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@44118 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -212,3 +212,17 @@ function _wp_rest_server_class_filter() {
|
||||
// Skip `setcookie` calls in auth_cookie functions due to warning:
|
||||
// Cannot modify header information - headers already sent by ...
|
||||
tests_add_filter( 'send_auth_cookies', '__return_false' );
|
||||
|
||||
/**
|
||||
* After the init action has been run once, trying to re-register block types can cause
|
||||
* _doing_it_wrong warnings. To avoid this, unhook the block registration functions.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*/
|
||||
function _unhook_block_registration() {
|
||||
remove_action( 'init', 'register_block_core_archives' );
|
||||
remove_action( 'init', 'register_block_core_categories' );
|
||||
remove_action( 'init', 'register_block_core_latest_posts' );
|
||||
remove_action( 'init', 'register_block_core_shortcode' );
|
||||
}
|
||||
tests_add_filter( 'init', '_unhook_block_registration', 1000 );
|
||||
|
||||
Reference in New Issue
Block a user