load_muplugin_textdomain

Advertisement

Summery Summery

Load the translated strings for a plugin residing in the mu-plugins directory.

Syntax Syntax

load_muplugin_textdomain( string $domain, string $mu_plugin_rel_path = '' )

Parameters Parameters

$domain

(string) (Required) Text domain. Unique identifier for retrieving translated strings.

$mu_plugin_rel_path

(string) (Optional) Relative to WPMU_PLUGIN_DIR directory in which the .mo file resides.

Default value: ''

Return Return

(bool) True when textdomain is successfully loaded, false otherwise.

Source Source

File: wp-includes/l10n.php

		return $return;
	}

	if ( is_admin() || wp_installing() || ( defined( 'WP_REPAIRING' ) && WP_REPAIRING ) ) {
		load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" );
	}

	if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) {
		load_textdomain( 'default', WP_LANG_DIR . "/admin-network-$locale.mo" );
	}

	return $return;
}

/**

Advertisement

Changelog Changelog

Changelog
Version Description
4.6.0 The function now tries to load the .mo file from the languages directory first.
3.0.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.