_WP_Dependency::set_translations( string $domain, string $path = '' ): bool
Sets the translation domain for this dependency.
Parameters
-
$domain
string Required -
The translation textdomain.
-
$path
string Optional -
The full file path to the directory containing translation files.
Default:
''
Return
bool False if $domain is not a string, true otherwise.
Source
File: wp-includes/class-wp-dependency.php
.
View all references
public function set_translations( $domain, $path = '' ) {
if ( ! is_string( $domain ) ) {
return false;
}
$this->textdomain = $domain;
$this->translations_path = $path;
return true;
}
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |