LLMS_Abstract_Notification_Controller::get_subscriber_option_array( string $id, string $enabled = 'yes' )
Get an array of prebuilt subscriber option settings for common subscriptions
Parameters Parameters
- $id
-
(string) (Required) Id of the subscriber type.
- $enabled
-
(string) (Optional) Whether or not the subscription should be enabled by default [yes|no]. Default is 'yes'.
Default value: 'yes'
Return Return
(array)
Source Source
File: includes/abstracts/llms.abstract.notification.controller.php
public function get_subscriber_option_array( $id, $enabled = 'yes' ) {
$defaults = array(
'author' => array(
'title' => __( 'Author', 'lifterlms' ),
),
'student' => array(
'title' => __( 'Student', 'lifterlms' ),
),
'lesson_author' => array(
'title' => __( 'Lesson Author', 'lifterlms' ),
),
'course_author' => array(
'title' => __( 'Course Author', 'lifterlms' ),
),
'custom' => array(
'description' => __( 'Enter additional email addresses which will receive this notification. Separate multiple addresses with commas.', 'lifterlms' ),
'title' => __( 'Additional Recipients', 'lifterlms' ),
),
);
if ( isset( $defaults[ $id ] ) ) {
$arr = $defaults[ $id ];
$arr['id'] = $id;
$arr['enabled'] = $enabled;
return $arr;
}
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.8.0 | |
| 3.30.3 | Introduced. |