WP_Textdomain_Registry::set()
Sets the language directory path for a specific domain and locale.
Also sets the 'current' property for direct access to the path for the current (most recent) locale.
Method of the class: WP_Textdomain_Registry{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Textdomain_Registry = new WP_Textdomain_Registry(); $WP_Textdomain_Registry->set( $domain, $locale, $path );
- $domain(string) (required)
- Text domain.
- $locale(string) (required)
- Locale.
- $path(string|false) (required)
- Language directory path or false if there is none available.
Changelog
Since 6.1.0 | Introduced. |
WP_Textdomain_Registry::set() WP Textdomain Registry::set code WP 6.4.3
public function set( $domain, $locale, $path ) { $this->all[ $domain ][ $locale ] = $path ? rtrim( $path, '/' ) . '/' : false; $this->current[ $domain ] = $this->all[ $domain ][ $locale ]; }