LLMS_Settings_Notifications::get_settings()

Get settings array


Return Return

(array)


Top ↑

Source Source

File: includes/admin/settings/class.llms.settings.notifications.php

	public function get_settings() {

		$settings = array();

		$settings[] = array(
			'class' => 'top',
			'id'    => 'notification_options',
			'type'  => 'sectionstart',
		);

		$settings[] = array(
			'title' => __( 'Notification Settings', 'lifterlms' ),
			'type'  => 'title',
			'id'    => 'notification_options_title',
		);

		if ( isset( $_GET['notification'] ) ) {

			$controller = llms()->notifications()->get_controller( llms_filter_input_sanitize_string( INPUT_GET, 'notification' ) );

			if ( $controller ) {

				$settings = array_merge( $settings, $this->get_notification_settings( $controller ) );

			} else {

				$settings[] = array(
					'id'    => 'notification_options_invalid_error',
					'type'  => 'custom-html',
					'value' => __( 'Invalid notification', 'lifterlms' ),
				);

			}
		} else {

			$settings[] = array(
				'id'    => 'llms_notifications_table',
				'table' => new LLMS_Table_NotificationSettings(),
				'type'  => 'table',
			);

		}

		$settings[] = array(
			'id'   => 'notification_options',
			'type' => 'sectionend',
		);

		return apply_filters( 'lifterlms_notifications_settings', $settings );

	}


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.