You appear to be a bot. Output may be restricted
Description
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.
Usage
_unhook_block_registration();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/includes/functions.php
Lines:
1 to 38 of 38
function _unhook_block_registration() { remove_action( 'init', 'register_block_core_archives' ); remove_action( 'init', 'register_block_core_block' ); remove_action( 'init', 'register_block_core_calendar' ); remove_action( 'init', 'register_block_core_categories' ); remove_action( 'init', 'register_block_core_file' ); remove_action( 'init', 'register_block_core_loginout' ); remove_action( 'init', 'register_block_core_latest_comments' ); remove_action( 'init', 'register_block_core_latest_posts' ); remove_action( 'init', 'register_block_core_page_list' ); remove_action( 'init', 'register_block_core_post_author' ); remove_action( 'init', 'register_block_core_post_content' ); remove_action( 'init', 'register_block_core_post_date' ); remove_action( 'init', 'register_block_core_post_excerpt' ); remove_action( 'init', 'register_block_core_post_featured_image' ); remove_action( 'init', 'register_block_core_post_terms' ); remove_action( 'init', 'register_block_core_post_title' ); remove_action( 'init', 'register_block_core_query' ); remove_action( 'init', 'register_block_core_post_template' ); remove_action( 'init', 'gutenberg_register_legacy_query_loop_block' ); remove_action( 'init', 'register_block_core_query_pagination' ); remove_action( 'init', 'register_block_core_query_pagination_next' ); remove_action( 'init', 'register_block_core_query_pagination_numbers' ); remove_action( 'init', 'register_block_core_query_pagination_previous' ); remove_action( 'init', 'register_block_core_query_title' ); remove_action( 'init', 'register_block_core_rss' ); remove_action( 'init', 'register_block_core_search' ); remove_action( 'init', 'register_block_core_shortcode' ); remove_action( 'init', 'register_block_core_site_tagline' ); remove_action( 'init', 'register_block_core_site_logo' ); remove_action( 'init', 'register_block_core_site_title' ); remove_action( 'init', 'register_block_core_social_link' ); remove_action( 'init', 'register_block_core_social_link' ); remove_action( 'init', 'register_block_core_tag_cloud' ); remove_action( 'init', 'register_core_block_types_from_metadata' ); remove_action( 'init', 'register_block_core_legacy_widget' ); }