Ticket #10527: is-textdomain-empty.diff

File is-textdomain-empty.diff, 677 bytes (added by nbachiyski, 3 years ago)
  • wp-includes/l10n.php

     
    439439} 
    440440 
    441441/** 
     442 * Tells you whether there are translations for the domain 
     443 * 
     444 * @param string $domain 
     445 * @return bool whether there are any translations for $domain 
     446 */ 
     447function is_textdomain_empty( $domain ) { 
     448        global $l10n; 
     449        return isset( $l10n[$domain] ); 
     450} 
     451 
     452/** 
    442453 * Translates role name. Since the role names are in the database and 
    443454 * not in the source there are dummy gettext calls to get them into the POT 
    444455 * file and this function properly translates them back.