Introduce is_textdomain_loaded(). Fixes #10527 props nbachiyski.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-02-22 19:10:03 +00:00
parent 0ebb6732bf
commit 2c52c876de
1 changed files with 12 additions and 0 deletions

View File

@ -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