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'


Top ↑

Return Return

(array)


Top ↑

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;
		}

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0
3.30.3 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.