BP_Core_BP_Nav_BackCompat::offsetExists( mixed $offset )

Check whether nav array has a value at the specified offset.


Parameters Parameters

$offset

(mixed) (Required) Array offset.


Top ↑

Return Return

(bool)


Source Source

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

	public function offsetExists( $offset ) {
		_doing_it_wrong(
			'bp_nav',
			__( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
			'2.6.0'
		);

		if ( isset( $this->backcompat_nav[ $offset ] ) ) {
			return true;
		}

		$nav = $this->get_nav( $offset );
		if ( $nav && isset( $nav[ $offset ] ) ) {
			return true;
		}

		return false;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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