Skip to content

Commit bd5f849

Browse files
committed
WP v5 compatibility
1 parent 5a1a45b commit bd5f849

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

inc/enhancements-and-fixes.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,12 @@ function pootlepb_override_gutenberg_init( $enable ) {
137137
}
138138
return $enable;
139139
}
140+
141+
add_filter( 'use_block_editor_for_post', 'pootlepb_use_block_editor_for_post', 25, 2 );
142+
143+
function pootlepb_use_block_editor_for_post( $use_block_editor, $post ) {
144+
if ( pootlepb_uses_pb( $post ) ) {
145+
$use_block_editor = false;
146+
}
147+
return $use_block_editor;
148+
}

0 commit comments

Comments
 (0)