BP_Group_Extension::__isset( string $key )

Provide a fallback for isset( $this->foo ) when foo is unavailable.


Description Description

This magic method is here for backward compatibility with plugins that have set their class config options directly in the class constructor. The parse_legacy_properties() method of the current class needs to check whether any legacy keys have been put into the $this->data array.


Parameters Parameters

$key

(Required) Property name.


Top ↑

Return Return

(bool) True if the value is set, otherwise false.


Top ↑

Source Source

File: bp-groups/classes/class-bp-group-extension.php

	public function __isset( $key ) {
		if ( isset( $this->legacy_properties[ $key ] ) ) {
			return true;
		} elseif ( isset( $this->data[ $key ] ) ) {
			return true;
		} else {
			return false;
		}
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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