Skip to content

Instantly share code, notes, and snippets.

@JeremyEnglert
Last active October 2, 2019 11:22
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JeremyEnglert/cd0227c776d2dab0029436f75e8bd422 to your computer and use it in GitHub Desktop.
Save JeremyEnglert/cd0227c776d2dab0029436f75e8bd422 to your computer and use it in GitHub Desktop.
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