LLMS_Abstract_Query::get( string $key, mixed $default = '' )

Retrieve a query variable with an optional fallback value when the value is not set.


Parameters Parameters

$key

(string) (Required) Variable key.

$default

(mixed) (Optional) Default value.

Default value: ''


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/abstracts/llms-abstract-query.php

	public function get( $key, $default = '' ) {
		return $this->query_vars[ $key ] ?? $default;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Moved from LLMS_Database_Query and updated to use the null coalesce operator.
3.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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