text() public static method

public static text ( $Code, $Default ) : mixed
$Code
$Default
return mixed
コード例 #1
0
ファイル: function.text.php プロジェクト: caidongyun/vanilla
/**
 * Returns the  custom text from a theme.
 *
 * @param array $Param The parameters passed into the function. This currently takes no parameters.
 *  - <b>code</b>: The text code set in the theme's information.
 *  - <b>default</b>: The default text if the user hasn't overridden.
 * @param Smarty The smarty object rendering the template.
 * @return The text.
 */
function smarty_function_text($Params, &$Smarty)
{
    $Result = Gdn_Theme::text(val('code', $Params, ''), val('default', $Params, ''));
    return $Result;
}