diff --git src/bp-templates/bp-nouveau/includes/functions.php src/bp-templates/bp-nouveau/includes/functions.php
index a06b20187..3d85eace9 100644
|
|
|
add_filter( 'bp_core_block_globals', 'bp_nouveau_register_core_block_globals', 1 |
| 1552 | 1552 | * @since 9.0.0 |
| 1553 | 1553 | */ |
| 1554 | 1554 | function bp_nouveau_unregister_blocks_for_post_context() { |
| 1555 | | unregister_block_type( 'bp/primary-nav' ); |
| | 1555 | if ( ! function_exists( 'unregister_block_type' ) ) { |
| | 1556 | return; |
| | 1557 | } |
| | 1558 | |
| | 1559 | $is_registered = WP_Block_Type_Registry::get_instance()->is_registered( 'bp/primary-nav' ); |
| | 1560 | |
| | 1561 | if ( $is_registered ) { |
| | 1562 | unregister_block_type( 'bp/primary-nav' ); |
| | 1563 | } |
| 1556 | 1564 | } |
| 1557 | 1565 | add_action( 'load-post.php', 'bp_nouveau_unregister_blocks_for_post_context' ); |
| 1558 | 1566 | add_action( 'load-post-new.php', 'bp_nouveau_unregister_blocks_for_post_context' ); |