<?php

/**
 * Smarty plugin.
 */

/**
 * Smarty {translate} function plugin.
 */
function smarty_modifier_checked($string, $value = null)
{
    if (is_null($value)) {
        return ($string) ? " checked='checked' " : '';
    }

    return ($string == $value) ? " checked='checked' " : '';
}
