Remove unneeded function "get_local_for_js"

This commit is contained in:
Dmitriy Simushev 2014-06-30 07:47:17 +00:00
parent 791abc1c2b
commit 2f82594a60

View File

@ -815,18 +815,6 @@ function get_localized_string($string, $locale)
return $string;
}
/* prepares for Javascript string */
function get_local_for_js($text, $params)
{
$string = get_localized_string($text, CURRENT_LOCALE);
$string = str_replace("\"", "\\\"", str_replace("\n", "\\n", $string));
for ($i = 0; $i < count($params); $i++) {
$string = str_replace("{" . $i . "}", $params[$i], $string);
}
return sanitize_string($string, 'low', 'moderate');
}
/**
* Saves a localized string to the database.
*