LLMS_Admin_Settings::set_field_defaults( array $value = array() )

Add and set default values for a field when looping


Parameters Parameters

$value

(array) (Optional) associative array of field data

Default value: array()


Top ↑

Return Return

(array) associative array of field data


Top ↑

Source Source

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

	public static function set_field_defaults( $value = array() ) {

		if ( ! isset( $value['id'] ) ) {
			$value['id'] = ''; }
		if ( ! isset( $value['title'] ) ) {
			$value['title'] = isset( $value['name'] ) ? $value['name'] : ''; }
		if ( ! isset( $value['class'] ) ) {
			$value['class'] = ''; }
		if ( ! isset( $value['css'] ) ) {
			$value['css'] = ''; }
		if ( ! isset( $value['default'] ) ) {
			$value['default'] = ''; }
		if ( ! isset( $value['desc'] ) ) {
			$value['desc'] = ''; }
		if ( ! isset( $value['desc_tooltip'] ) ) {
			$value['desc_tooltip'] = false; }

		return $value;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.4.5 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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