LLMS_Settings_Page::generate_settings_group( string $id, string $title, string $title_desc = '', array[] $settings = array() )

Generates a group of settings.


Parameters Parameters

$id

(string) (Required) Group ID. Used to create IDs for the start, end, and title fields.

$title

(string) (Required) Title of the group (should be translatable).

$title_desc

(string) (Optional) (Optional) title field description text.

Default value: ''

$settings

(array[]) (Optional) Array of settings field arrays.

Default value: array()


Top ↑

Return Return

(array[])


Top ↑

Source Source

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

	protected function generate_settings_group( $id, $title, $title_desc = '', $settings = array() ) {

		$start = array(
			array(
				'type' => 'sectionstart',
				'id'   => $id,
			),
			array(
				'type'  => 'title',
				'id'    => sprintf( '%s_title', $id ),
				'title' => $title,
				'desc'  => $title_desc,
			),
		);

		$end = array(
			array(
				'type' => 'sectionend',
				'id'   => sprintf( '%s_end', $id ),
			),
		);

		return array_merge( $start, $settings, $end );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.37.3 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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