mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
Remove unneeded function "get_local_for_js"
This commit is contained in:
parent
791abc1c2b
commit
2f82594a60
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user