bp_core_get_active_components( array $args = array(), string $output = 'ids', string $operator = 'and' )

Get a list of all active component objects.


Description Description


Parameters Parameters

$args

(Optional) An array of key => value arguments to match against the component objects.

  • 'name'
    (string) Translatable name for the component.
  • 'id'
    (string) Unique ID for the component.
  • 'slug'
    (string) Unique slug for the component, for use in query strings and URLs.
  • 'has_directory'
    (bool) True if the component has a top-level directory. False otherwise.
  • 'root_slug'
    (string) Slug used by the component's directory page.

Default value: array()

$output

(Optional) The type of output to return. Accepts 'ids' or 'objects'. Default 'ids'.

Default value: 'ids'

$operator

(Optional) The logical operation to perform. 'or' means only one element from the array needs to match; 'and' means all elements must match. Accepts 'or' or 'and'. Default 'and'.

Default value: 'and'


Top ↑

Return Return

(array) A list of component ids or objects.


Top ↑

Source Source

File: bp-core/bp-core-functions.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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