BP_REST_Components_Endpoint::get_component_info( string $component )

Get component info helper.


Description Description


Parameters Parameters

$component

(Required) Component id.


Top ↑

Return Return

(array)


Top ↑

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'],
		);
	}

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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