Clanbite Since 1.5.0

clanbite_format_message( string $template, array $vars ): string

Replace {placeholder} tokens in a template.

Only tokens that have a value in $vars are replaced; anything else is left as written, so a typo stays visible.

Parameters

$template (string) Required

Wording with {token} placeholders.

$vars (array<string, scalar>) Required

Token => value (plain text).

Returns

string

Defined in inc/messages.php

Changelog

VersionDescription
1.5.0Introduced.