Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Set BeaverBuilder as Default Editor
<?php
// Sets Beaver Builder as the default editor.
function make_beaver_builder_default( $post_ID, $post, $update ) {
if ( ! $update ) {
update_post_meta( $post_ID, '_fl_builder_enabled', true );
}
}
add_action( 'wp_insert_post', 'make_beaver_builder_default', 10, 3 );
// Hides the editor button from editor screen
function remove_text_editor() {
echo '<style>
.fl-builder-admin-tabs {
display: none;
}
</style>';
}
add_action('admin_head', 'remove_text_editor');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.