summaryrefslogtreecommitdiffstats
path: root/wp-includes/l10n.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wp-includes/l10n.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php
index 38c30b8..9a8ff84 100644
--- a/wp-includes/l10n.php
+++ b/wp-includes/l10n.php
@@ -728,6 +728,10 @@ function load_textdomain( $domain, $mofile, $locale = null ) {
$l10n_unloaded = (array) $l10n_unloaded;
+ if ( ! is_string( $domain ) ) {
+ return false;
+ }
+
/**
* Filters whether to short-circuit loading .mo file.
*
@@ -989,6 +993,10 @@ function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path
/** @var WP_Textdomain_Registry $wp_textdomain_registry */
global $wp_textdomain_registry;
+ if ( ! is_string( $domain ) ) {
+ return false;
+ }
+
/**
* Filters a plugin's locale.
*
@@ -1037,6 +1045,10 @@ function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) {
/** @var WP_Textdomain_Registry $wp_textdomain_registry */
global $wp_textdomain_registry;
+ if ( ! is_string( $domain ) ) {
+ return false;
+ }
+
/** This filter is documented in wp-includes/l10n.php */
$locale = apply_filters( 'plugin_locale', determine_locale(), $domain );
@@ -1076,6 +1088,10 @@ function load_theme_textdomain( $domain, $path = false ) {
/** @var WP_Textdomain_Registry $wp_textdomain_registry */
global $wp_textdomain_registry;
+ if ( ! is_string( $domain ) ) {
+ return false;
+ }
+
/**
* Filters a theme's locale.
*