Changeset 43752 for branches/5.0/tests/phpunit/includes/functions.php
- Timestamp:
- 10/18/2018 11:53:49 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/tests/phpunit/includes/functions.php
r41966 r43752 183 183 // Cannot modify header information - headers already sent by ... 184 184 tests_add_filter( 'send_auth_cookies', '__return_false' ); 185 186 /** 187 * After the init action has been run once, trying to re-register block types can cause 188 * _doing_it_wrong warnings. To avoid this, unhook the block registration functions. 189 * 190 * @since 5.0.0 191 */ 192 function _unhook_block_registration() { 193 remove_action( 'init', 'register_block_core_archives' ); 194 remove_action( 'init', 'register_block_core_categories' ); 195 remove_action( 'init', 'register_block_core_latest_posts' ); 196 remove_action( 'init', 'register_block_core_shortcode' ); 197 } 198 tests_add_filter( 'init', '_unhook_block_registration', 1000 );
Note: See TracChangeset
for help on using the changeset viewer.