Module::get_form_option( int $form_id, string $option, mixed $default = false )

Retrieves the value of a specific module option for a specific form.

Description

See also

Parameters

$form_id

(int) (Required) Form ID.

$option

(string) (Required) Name of the form option to retrieve.

$default

(mixed) (Optional) Value to return if the form option doesn't exist.

Default value: false

Return

(mixed) Value set for the option.

Source

File: src/modules/module.php

	public function get_form_option( $form_id, $option, $default = false ) {
		$metadata = $this->get_form_options( $form_id );

		if ( isset( $metadata[ $option ] ) ) {
			return $metadata[ $option ];
		}

		return $default;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.