LLMS_Settings_Notifications::get_settings()

Get settings array


Return Return

(array)


Top ↑

Source Source

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

	/**
	 * Get settings array
	 *
	 * @since 3.8.0
	 * @since 3.30.3 Fixed typo in title id.
	 *
	 * @return array
	 */
	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( INPUT_GET, 'notification', FILTER_SANITIZE_STRING ) );

			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',
			);

		}



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.