Clanbite Since 1.6.3

clanbite_render_component( string $slug, array $args = array() ): string

Render a component. Returns an empty string when it (or something it requires) is not available.

Parameters

$slug (string) Required

Component slug.

$args (array<string, mixed>) Optional

Arguments for the component. surface (where it is shown: feed, forums…) is understood by every component and becomes the class is-{surface}; viewer_id defaults to the current user.

Default: array()

Returns

string HTML as the component printed it (the provider escapes it).

Defined in inc/components.php

Changelog

VersionDescription
1.6.3Introduced.