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