bp_core_admin_get_components

Return a list of component information.

Description

(array) bp_core_admin_get_components( (string) $type = 'all' ); 

We use this information both to build the markup for the admin screens, as well as to do some processing on settings data submitted from those screens.

Returns (array)

Requested components' data.

Parameters (1)

0. $type — Optional. (string) => 'all'
Optional; component type to fetch. Default value is all,, or optional., retired, required.

Usage

  1. if ( !function_exists( 'bp_core_admin_get_components' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/admin/bp-core-admin-components.php'; 
  3.  
  4. // Optional; component type to fetch. Default value is 'all', or 'optional', 'retired', 'required'. 
  5. $type = 'all'; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_core_admin_get_components($type); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-core/admin/bp-core-admin-components.php  
  1. function bp_core_admin_get_components( $type = 'all' ) { 
  2. $components = bp_core_get_components( $type ); 
  3.  
  4. /** 
  5. * Filters the list of component information. 
  6. * @since 2.0.0 
  7. * @param array $components Array of component information. 
  8. * @param string $type Type of component list requested. 
  9. * Possible values include 'all', 'optional',  
  10. * 'retired', 'required'. 
  11. */ 
  12. return apply_filters( 'bp_core_admin_get_components', $components, $type );