|
1 | 1 | <?php |
2 | 2 |
|
3 | | -// This file was autogenerated by tools/release/sync-stable-blocks.js, do not change manually! |
4 | | -remove_action( 'init', 'register_block_core_accordion' ); |
5 | | -remove_action( 'init', 'register_block_core_accordion_item' ); |
6 | | -remove_action( 'init', 'register_block_core_archives' ); |
7 | | -remove_action( 'init', 'register_block_core_avatar' ); |
8 | | -remove_action( 'init', 'register_block_core_block' ); |
9 | | -remove_action( 'init', 'register_block_core_breadcrumbs' ); |
10 | | -remove_action( 'init', 'register_block_core_button' ); |
11 | | -remove_action( 'init', 'register_block_core_calendar' ); |
12 | | -remove_action( 'init', 'register_block_core_categories' ); |
13 | | -remove_action( 'init', 'register_block_core_comment_author_name' ); |
14 | | -remove_action( 'init', 'register_block_core_comment_content' ); |
15 | | -remove_action( 'init', 'register_block_core_comment_date' ); |
16 | | -remove_action( 'init', 'register_block_core_comment_edit_link' ); |
17 | | -remove_action( 'init', 'register_block_core_comment_reply_link' ); |
18 | | -remove_action( 'init', 'register_block_core_comment_template' ); |
19 | | -remove_action( 'init', 'register_block_core_comments' ); |
20 | | -remove_action( 'init', 'register_block_core_comments_pagination' ); |
21 | | -remove_action( 'init', 'register_block_core_comments_pagination_next' ); |
22 | | -remove_action( 'init', 'register_block_core_comments_pagination_numbers' ); |
23 | | -remove_action( 'init', 'register_block_core_comments_pagination_previous' ); |
24 | | -remove_action( 'init', 'register_block_core_comments_title' ); |
25 | | -remove_action( 'init', 'register_block_core_cover' ); |
26 | | -remove_action( 'init', 'register_block_core_file' ); |
27 | | -remove_action( 'init', 'register_block_core_footnotes' ); |
28 | | -remove_action( 'init', 'register_block_core_gallery' ); |
29 | | -remove_action( 'init', 'register_block_core_heading' ); |
30 | | -remove_action( 'init', 'register_block_core_home_link' ); |
31 | | -remove_action( 'init', 'register_block_core_image' ); |
32 | | -remove_action( 'init', 'register_block_core_latest_comments' ); |
33 | | -remove_action( 'init', 'register_block_core_latest_posts' ); |
34 | | -remove_action( 'init', 'register_block_core_list' ); |
35 | | -remove_action( 'init', 'register_block_core_loginout' ); |
36 | | -remove_action( 'init', 'register_block_core_media_text' ); |
37 | | -remove_action( 'init', 'register_block_core_navigation' ); |
38 | | -remove_action( 'init', 'register_block_core_navigation_link' ); |
39 | | -remove_action( 'init', 'register_block_core_navigation_submenu' ); |
40 | | -remove_action( 'init', 'register_block_core_page_list' ); |
41 | | -remove_action( 'init', 'register_block_core_page_list_item' ); |
42 | | -remove_action( 'init', 'register_block_core_paragraph' ); |
43 | | -remove_action( 'init', 'register_block_core_pattern' ); |
44 | | -remove_action( 'init', 'register_block_core_post_author' ); |
45 | | -remove_action( 'init', 'register_block_core_post_author_biography' ); |
46 | | -remove_action( 'init', 'register_block_core_post_author_name' ); |
47 | | -remove_action( 'init', 'register_block_core_post_comments_count' ); |
48 | | -remove_action( 'init', 'register_block_core_post_comments_form' ); |
49 | | -remove_action( 'init', 'register_block_core_post_comments_link' ); |
50 | | -remove_action( 'init', 'register_block_core_post_content' ); |
51 | | -remove_action( 'init', 'register_block_core_post_date' ); |
52 | | -remove_action( 'init', 'register_block_core_post_excerpt' ); |
53 | | -remove_action( 'init', 'register_block_core_post_featured_image' ); |
54 | | -remove_action( 'init', 'register_block_core_post_navigation_link' ); |
55 | | -remove_action( 'init', 'register_block_core_post_template' ); |
56 | | -remove_action( 'init', 'register_block_core_post_terms' ); |
57 | | -remove_action( 'init', 'register_block_core_post_time_to_read' ); |
58 | | -remove_action( 'init', 'register_block_core_post_title' ); |
59 | | -remove_action( 'init', 'register_block_core_query' ); |
60 | | -remove_action( 'init', 'register_block_core_query_no_results' ); |
61 | | -remove_action( 'init', 'register_block_core_query_pagination' ); |
62 | | -remove_action( 'init', 'register_block_core_query_pagination_next' ); |
63 | | -remove_action( 'init', 'register_block_core_query_pagination_numbers' ); |
64 | | -remove_action( 'init', 'register_block_core_query_pagination_previous' ); |
65 | | -remove_action( 'init', 'register_block_core_query_title' ); |
66 | | -remove_action( 'init', 'register_block_core_query_total' ); |
67 | | -remove_action( 'init', 'register_block_core_read_more' ); |
68 | | -remove_action( 'init', 'register_block_core_rss' ); |
69 | | -remove_action( 'init', 'register_block_core_search' ); |
70 | | -remove_action( 'init', 'register_block_core_shortcode' ); |
71 | | -remove_action( 'init', 'register_block_core_site_logo' ); |
72 | | -remove_action( 'init', 'register_block_core_site_tagline' ); |
73 | | -remove_action( 'init', 'register_block_core_site_title' ); |
74 | | -remove_action( 'init', 'register_block_core_social_link' ); |
75 | | -remove_action( 'init', 'register_block_core_tag_cloud' ); |
76 | | -remove_action( 'init', 'register_block_core_template_part' ); |
77 | | -remove_action( 'init', 'register_block_core_term_count' ); |
78 | | -remove_action( 'init', 'register_block_core_term_description' ); |
79 | | -remove_action( 'init', 'register_block_core_term_name' ); |
80 | | -remove_action( 'init', 'register_block_core_term_template' ); |
81 | | -remove_action( 'init', 'register_block_core_video' ); |
| 3 | +// Unhook block registration functions to prevent _doing_it_wrong warnings |
| 4 | +// when tests re-trigger the init action. See _unhook_block_registration(). |
| 5 | +$blocks_dir = ABSPATH . WPINC . '/blocks/'; |
| 6 | +foreach ( glob( $blocks_dir . '*.php' ) as $block_file ) { |
| 7 | + $block_name = basename( $block_file, '.php' ); |
| 8 | + |
| 9 | + if ( ! is_dir( $blocks_dir . $block_name ) ) { |
| 10 | + continue; |
| 11 | + } |
| 12 | + |
| 13 | + remove_action( 'init', 'register_block_core_' . str_replace( '-', '_', $block_name ) ); |
| 14 | +} |
0 commit comments