Class used to handle translation warnings.
| since | 1.0.0 |
|---|---|
| package | GlotPress |
add(string $id, callable $callback)
| since | 1.0.0 |
|---|---|
| access | public |
stringUnique ID of the callback.
callableThe callback.
check(string $singular, string $plural, array<mixed,string> $translations, \GP_Locale $locale) : array | null
| since | 1.0.0 |
|---|---|
| access | public |
stringThe singular form of an original string.
stringThe plural form of an original string.
array<mixed,string>An array of translations for an original.
\GP_LocaleThe locale of the translations.
arraynullNull if no issues have been found, otherwise an array
with warnings.has(string $id) : boolean
| since | 1.0.0 |
|---|---|
| access | public |
stringUnique ID of the callback.
booleanTrue if exists, false if not.remove(string $id)
| since | 1.0.0 |
|---|---|
| access | public |
stringUnique ID of the callback.
$callbacks : array<mixed,callable>
array()| since | 1.0.0 |
|---|---|
| access | public |