BP_Group_Extension::__get( string $key )

Provide access to otherwise unavailable object properties.


Description 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 Parameters

$key

(Required) Property name.


Top ↑

Return Return

(mixed) The value if found, otherwise null.


Top ↑

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

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.