BP_Core::__get( string $key = '' )

Magic getter.


Description Description

This exists specifically for supporting deprecated object vars.


Top ↑

Parameters Parameters

$key

(string) (Optional)

Default value: ''


Top ↑

Return Return

(mixed)


Source Source

File: bp-core/classes/class-bp-core.php

	public function __get( $key = '' ) {

		// Backwards compatibility for the original Notifications table var
		if ( 'table_name_notifications' === $key ) {
			return bp_is_active( 'notifications' )
				? buddypress()->notifications->table_name
				: buddypress()->table_prefix . 'bp_notifications';
		}

		// Return object var if set, else null
		return isset( $this->{$key} )
			? $this->{$key}
			: null;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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