mirror of
https://github.com/Mibew/mibew.git
synced 2025-05-11 06:23:06 +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;
|
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.
|
* Saves a localized string to the database.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user