BP_Group_Extension::__isset( string $key )

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

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

$key

(string) (Required) Property name.

Return

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

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;
		}
	}

Changelog

Changelog
Version Description
BuddyPress 1.8.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.