Warning: This function has been deprecated. See https://lifterlms.com/docs/course-builder-custom-fields-for-developers for more information instead.

llms_get_quiz_theme_setting( string $setting = '', string $default = '' )

Get quiz settings defined by supporting themes


Description Description


Parameters Parameters

$setting

(string) (Optional) Name of setting, if omitted returns all settings.

Default value: ''

$default

(string) (Optional) Default fallback if setting not set.

Default value: ''


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/functions/llms.functions.quiz.php

function llms_get_quiz_theme_setting( $setting = '', $default = '' ) {

	// Deprecation notice for filter (and function).
	llms_log( 'Filter `llms_get_quiz_theme_settings` deprecated since 3.17.6. For more information see new methods at https://lifterlms.com/docs/course-builder-custom-fields-for-developers/' );

	/**
	 * Deprecated.
	 *
	 * @since 3.17.0
	 * @deprecated 3.17.6 Deprecated. See https://lifterlms.com/docs/course-builder-custom-fields-for-developers for more information.
	 *
	 * @param array[] $settings Array of quiz theme settings.
	 */
	$settings = apply_filters(
		'llms_get_quiz_theme_settings',
		array(
			'layout' => array(
				'id'      => '',
				'name'    => __( 'Layout', 'lifterlms' ),
				'options' => array(),
				'type'    => 'select', // Either: select or image_select.
			),
		)
	);

	if ( $setting ) {
		return isset( $settings[ $setting ] ) ? $settings[ $setting ] : $default;
	}

	return $settings;

}

Top ↑

Changelog Changelog

Changelog
Version Description
3.38.0 See <a href="https://lifterlms.com/docs/course-builder-custom-fields-for-developers">https://lifterlms.com/docs/course-builder-custom-fields-for-developers</a> for more information.
3.16.8 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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