_WP_Dependency::set_translations( string $domain, string $path = null )

Sets the translation domain for this dependency.

Parameters Parameters


(string) (Required) The translation textdomain.


(string) (Optional) The full file path to the directory containing translation files.

Default value: null

Top ↑

Return Return

(bool) False if $domain is not a string, true otherwise.

Top ↑

Source Source

File: wp-includes/class-wp-dependency.php

	public function set_translations( $domain, $path = null ) {
		if ( ! is_string( $domain ) ) {
			return false;
		$this->textdomain        = $domain;
		$this->translations_path = $path;
		return true;

Top ↑

Changelog Changelog

Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.