BP_REST_Components_Endpoint::get_component_info( string $component )
Get component info helper.
Description
Parameters
- $component
-
(Required) Component id.
Return
(array)
Source
File: bp-core/classes/class-bp-rest-components-endpoint.php
public function get_component_info( $component ) { // Get all components. $components = bp_core_get_components(); // Get specific component info. $info = $components[ $component ]; // Return empty early. if ( empty( $info ) ) { return array(); } return array( 'name' => $component, 'status' => $this->verify_component_status( $component ), 'title' => $info['title'], 'description' => $info['description'], ); }
Changelog
Version | Description |
---|---|
0.1.0 | 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.