Skip to content

Commit

Permalink
Adding course and lesson to be always enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhogg committed Nov 21, 2024
1 parent feb4229 commit 3f80d82
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions includes/class-llms-beaver-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ protected function init() {
// Prevent uneditable llms post types from being enabled for page building.
add_filter( 'fl_builder_admin_settings_post_types', array( $this, 'remove_uneditable_post_types' ) );

// Add migrateable post types to the builder by default.
add_filter( 'fl_builder_post_types', array( $this, 'enable_post_types_by_default' ) );

add_action( 'init', array( $this, 'load_modules' ) );
add_action( 'init', array( $this, 'load_templates' ) );

Expand All @@ -60,6 +63,13 @@ protected function init() {
add_action( 'llms_pa_after_do_area_content', array( $this, 'llms_pa_after_content' ) );
}

public function enable_post_types_by_default( $types ) {
$types[] = 'course';
$types[] = 'lesson';

return $types;
}

/**
* Add LLMS post types to the enabled builder post types.
*
Expand Down

0 comments on commit 3f80d82

Please sign in to comment.