LLMS_Integration_BBPress::course_settings_fields( array $fields )
Register custom bbPress tab with the LLMS Course metabox
Parameters Parameters
- $fields
-
(array) (Required) Existing fields.
Return Return
(array)
Source Source
File: includes/integrations/class.llms.integration.bbpress.php
public function course_settings_fields( $fields ) {
global $post;
$selected = $this->get_course_forum_ids( $post );
$fields[] = array(
'title' => __( 'bbPress', 'lifterlms' ),
'fields' => array(
array(
'allow_null' => false,
'data_attributes' => array(
'post-type' => 'forum',
'allow-clear' => true,
'placeholder' => __( 'Select forums', 'lifterlms' ),
),
'desc' => __( 'Add forums which will only be available to students currently enrolled in this course.', 'lifterlms' ),
'class' => 'llms-select2-post',
'id' => '_llms_bbp_forum_ids',
'type' => 'select',
'label' => __( 'Private Course Forums', 'lifterlms' ),
'multi' => true,
'value' => llms_make_select2_post_array( $selected ),
),
),
);
return $fields;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.12.0 | Introduced. |