Make WordPress Core


Ignore:
Timestamp:
02/22/2010 07:10:03 PM (15 years ago)
Author:
nacin
Message:

Introduce is_textdomain_loaded(). Fixes #10527 props nbachiyski.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r13096 r13304  
    440440
    441441/**
     442 * Whether there are translations for the domain
     443 *
     444 * @since 3.0.0
     445 * @param string $domain
     446 * @return bool Whether there are translations
     447 */
     448function is_textdomain_loaded( $domain ) {
     449    global $l10n;
     450    return isset( $l10n[$domain] );
     451}
     452
     453/**
    442454 * Translates role name. Since the role names are in the database and
    443455 * not in the source there are dummy gettext calls to get them into the POT
Note: See TracChangeset for help on using the changeset viewer.