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

Add and set default values for a field when looping


Parameters Parameters

$field

(array) (Optional) Associative array of field data, LLMS_Admin_Settings::output_field() for a full description.

Default value: array()


Top ↑

Return Return

(array)


Top ↑

Source Source

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

		$field = wp_parse_args(
			$field,
			array(
				'id'           => '',
				'title'        => $field['name'] ?? '',
				'class'        => '',
				'css'          => '',
				'default'      => '',
				'desc'         => '',
				'desc_tooltip' => '',
				'after_html'   => '',
			)
		);

		return $field;

	}



Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Use wp_parse_args() to simplify method logic & add after_html default.
1.4.5 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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