BP_Group_Extension::__get( string $key )

Provide access to otherwise unavailable object properties.

Description

This magic method is here for backward compatibility with plugins that refer to config properties that have moved to a different location (such as enable_create_step, which is now at $this->screens[‘create’][‘enabled’]

The legacy_properties array is set up in self::setup_legacy_properties().

Parameters

$key

(string) (Required) Property name.

Return

(mixed) The value if found, otherwise null.

Source

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

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

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.