bbp_filter_notifications_get_registered_components( array $component_names = array() )

Filter registered notifications components, and add ‘forums’ to the queried ‘component_name’ array.

Description

See also

Parameters

$component_names

(array) (Optional)

Default value: array()

Return

(array)

Source

File: bp-forums/notifications.php

function bbp_filter_notifications_get_registered_components( $component_names = array() ) {

	// Force $component_names to be an array
	if ( ! is_array( $component_names ) ) {
		$component_names = array();
	}

	// Add 'forums' component to registered components array
	array_push( $component_names, bbp_get_component_name() );

	// Return component's with 'forums' appended
	return $component_names;
}

Changelog

Changelog
Version Description
bbPress (r5232) 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.