From 2c52c876deb45cc95730baa635e19b08801c3bd8 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 22 Feb 2010 19:10:03 +0000 Subject: [PATCH] Introduce is_textdomain_loaded(). Fixes #10527 props nbachiyski. git-svn-id: http://svn.automattic.com/wordpress/trunk@13304 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 5e37f5052..d3471df29 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -438,6 +438,18 @@ function &get_translations_for_domain( $domain ) { return $l10n[$domain]; } +/** + * Whether there are translations for the domain + * + * @since 3.0.0 + * @param string $domain + * @return bool Whether there are translations + */ +function is_textdomain_loaded( $domain ) { + global $l10n; + return isset( $l10n[$domain] ); +} + /** * Translates role name. Since the role names are in the database and * not in the source there are dummy gettext calls to get them into the POT