LLMS_Meta_Box_Email_Settings::get_fields()

Builds array of metabox options.


Description Description

Array is called in output method to display options. Appropriate fields are generated based on type.


Top ↑

Return Return

(array) Array of metabox fields.


Top ↑

Source Source

File: includes/admin/post-types/meta-boxes/class.llms.meta.box.email.settings.php

	public function get_fields() {

		$email_merge = array(
			'{student_email}' => __( 'Student Email', 'lifterlms' ),
			'{admin_email}'   => __( 'Admin Email', 'lifterlms' ),
		);

		return array(
			array(
				'title'  => 'Settings',
				'fields' => array(
					array(
						'type'       => 'text',
						'label'      => __( 'Email Subject', 'lifterlms' ),
						'desc'       => __( 'This will be used for the subject line of your email.', 'lifterlms' ) . llms_merge_code_button( '#' . $this->prefix . 'email_subject', false ),
						'id'         => $this->prefix . 'email_subject',
						'class'      => 'code input-full',
						'value'      => '',
						'desc_class' => 'd-all',
						'group'      => 'top',
						'sanitize'   => 'no_encode_quotes',
					),
					array(
						'type'       => 'text',
						'label'      => __( 'Email Heading', 'lifterlms' ),
						'desc'       => __( 'This is the heading for your email. It will display above the content.', 'lifterlms' ),
						'id'         => $this->prefix . 'email_heading',
						'class'      => 'code input-full',
						'value'      => '',
						'desc_class' => 'd-all',
						'group'      => 'bottom',
						'sanitize'   => 'no_encode_quotes',
					),
					array(
						'type'       => 'text',
						'label'      => __( 'Email To:', 'lifterlms' ),
						'desc'       => __( 'Separate multiple address with a comma.', 'lifterlms' ) . llms_merge_code_button( '#' . $this->prefix . 'email_to', false, $email_merge ),
						'default'    => '{student_email}',
						'id'         => $this->prefix . 'email_to',
						'class'      => 'code input-full',
						'required'   => true,
						'value'      => '',
						'desc_class' => 'd-all',
					),
					array(
						'type'       => 'text',
						'label'      => __( 'Email CC:', 'lifterlms' ),
						'desc'       => __( 'Separate multiple address with a comma.', 'lifterlms' ) . llms_merge_code_button( '#' . $this->prefix . 'email_cc', false, $email_merge ),
						'id'         => $this->prefix . 'email_cc',
						'class'      => 'code input-full',
						'value'      => '',
						'desc_class' => 'd-all',
					),
					array(
						'type'       => 'text',
						'label'      => __( 'Email BCC:', 'lifterlms' ),
						'desc'       => __( 'Separate multiple address with a comma.', 'lifterlms' ) . llms_merge_code_button( '#' . $this->prefix . 'email_bcc', false, $email_merge ),
						'id'         => $this->prefix . 'email_bcc',
						'class'      => 'code input-full',
						'value'      => '',
						'desc_class' => 'd-all',
					),
				),
			),
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.37.12 Allow some fields to store values with quotes.
3.1.0 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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