Changeset 44118 for trunk/tests/phpunit/includes/functions.php
- Timestamp:
- 12/13/2018 06:11:10 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43752
- Property svn:mergeinfo changed
-
trunk/tests/phpunit/includes/functions.php
r43555 r44118 213 213 // Cannot modify header information - headers already sent by ... 214 214 tests_add_filter( 'send_auth_cookies', '__return_false' ); 215 216 /** 217 * After the init action has been run once, trying to re-register block types can cause 218 * _doing_it_wrong warnings. To avoid this, unhook the block registration functions. 219 * 220 * @since 5.0.0 221 */ 222 function _unhook_block_registration() { 223 remove_action( 'init', 'register_block_core_archives' ); 224 remove_action( 'init', 'register_block_core_categories' ); 225 remove_action( 'init', 'register_block_core_latest_posts' ); 226 remove_action( 'init', 'register_block_core_shortcode' ); 227 } 228 tests_add_filter( 'init', '_unhook_block_registration', 1000 );
Note: See TracChangeset
for help on using the changeset viewer.