Class used to handle translation errors.
| since | 4.0.0 |
|---|---|
| package | GlotPress |
add(string $id, callable $callback)
| since | 4.0.0 |
|---|---|
| access | public |
stringUnique ID of the callback.
callableThe callback.
check(\GP_Original $gp_original, array<mixed,string> $translations, \GP_Locale $locale) : array | null
| since | 4.0.0 |
|---|---|
| access | public |
\GP_OriginalThe original object.
array<mixed,string>The translations.
\GP_LocaleThe locale.
arraynullNull if no issues have been found, otherwise an array
with errors.has(string $id) : boolean
| since | 4.0.0 |
|---|---|
| access | public |
stringUnique ID of the callback.
booleanTrue if exists, false if not.remove(string $id)
| since | 4.0.0 |
|---|---|
| access | public |
stringUnique ID of the callback.
$callbacks : array<mixed,callable>
array()| since | 4.0.0 |
|---|---|
| access | public |