Skip to content

Commit

Permalink
fix: Conditional fix
Browse files Browse the repository at this point in the history
  • Loading branch information
seebeen committed Jan 24, 2024
1 parent 1f79fe5 commit b5d433d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/oblak-polyfill-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ function deregister_all_blocks() {
return;
}

array_walk(
array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ),
static fn( $b ) => WP_Block_Type_Registry::get_instance()->unregister( $b )
);
foreach ( array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ) as $block ) {
WP_Block_Type_Registry::get_instance()->unregister( $block );
}
}

endif;

0 comments on commit b5d433d

Please sign in to comment.