BP_REST_Components_Endpoint::get_component_info( string $component )
Get component info helper.
Description Description
Parameters Parameters
- $component
-
(Required) Component id.
Return Return
(array)
Source 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 Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |