WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Theme::load_textdomain() WP 3.4.0

Loads the theme's textdomain.

Translation files are not inherited from the parent theme. Todo: if this fails for the child theme, it should probably try to load the parent theme's translations.

Это метод класса: WP_Theme

Хуков нет.

Возвращает

true/false. True if the textdomain was successfully loaded or has already been loaded. False if no textdomain was specified in the file headers, or if the domain could not be loaded.

Использование

$WP_Theme = new WP_Theme();
$var = $WP_Theme->load_textdomain();

Список изменений

С версии 3.4.0 Введена.

Код WP Theme::load textdomain: wp-includes/class-wp-theme.php WP 5.2.2

<?php
public function load_textdomain() {
	if ( isset( $this->textdomain_loaded ) ) {
		return $this->textdomain_loaded;
	}

	$textdomain = $this->get( 'TextDomain' );
	if ( ! $textdomain ) {
		$this->textdomain_loaded = false;
		return false;
	}

	if ( is_textdomain_loaded( $textdomain ) ) {
		$this->textdomain_loaded = true;
		return true;
	}

	$path = $this->get_stylesheet_directory();
	if ( $domainpath = $this->get( 'DomainPath' ) ) {
		$path .= $domainpath;
	} else {
		$path .= '/languages';
	}

	$this->textdomain_loaded = load_theme_textdomain( $textdomain, $path );
	return $this->textdomain_loaded;
}