File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -437,8 +437,13 @@ public function remove_comment_blocks( $allowed_block_types ) {
437437 */
438438 $ disallowed_blocks = apply_filters ( 'tenup_experience_disable_comments_disallowed_blocks ' , $ disallowed_blocks );
439439
440- // Get all registered blocks if $allowed_block_types is not already set.
441- if ( ! is_array ( $ allowed_block_types ) || empty ( $ allowed_block_types ) ) {
440+ // Respect other filters that have disabled all blocks.
441+ if ( false === $ allowed_block_types ) {
442+ return false ;
443+ }
444+
445+ // Get all registered blocks if all blocks are allowed or no explicit list is set.
446+ if ( true === $ allowed_block_types || ! is_array ( $ allowed_block_types ) || empty ( $ allowed_block_types ) ) {
442447 $ registered_blocks = \WP_Block_Type_Registry::get_instance ()->get_all_registered ();
443448 $ allowed_block_types = array_keys ( $ registered_blocks );
444449
You can’t perform that action at this time.
0 commit comments