Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_BuddyPress_Integration::bp_is_current_component( array $settings = array() )

Checks if the current page is the selected bp components.


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Parameters Parameters

$settings

(Optional)

Default value: array()


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/integrations/class-pum-buddypress-integration.php

	public static function bp_is_current_component( $settings = array() ) {
		global $bp;

		if ( empty ( $settings['selected'] ) ) {
			return false;
		}

		if ( ! is_array( $settings['selected'] ) ) {
			$settings['selected'] = array( $settings['selected'] );
		}

		$found = false;

		foreach ( $settings['selected'] as $component ) {
			if ( ! array_key_exists( $component, $bp->active_components ) ) {
				continue;
			}

			if ( bp_is_current_component( $component ) ) {
				$found = true;
			}

		}

		return $found;
	}

Top ↑

User Contributed Notes User Contributed Notes

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