Make WordPress Core

Ticket #35442: 35442 fix-is_textdomain_loaded.patch

File 35442 fix-is_textdomain_loaded.patch, 707 bytes (added by jrf, 9 years ago)
  • src/wp-includes/l10n.php

    From df3c4fa0c77b1f78c2a24e618cbde7d517ce5cc6 Mon Sep 17 00:00:00 2001
    From: jrfnl <github_nospam@adviesenzo.nl>
    Date: Wed, 13 Jan 2016 13:10:48 +0100
    Subject: [PATCH] Fix the return for `is_textdomain_loaded()`.
    
    ---
     src/wp-includes/l10n.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php
    index a69a718..df52ef5 100644
    a b function get_translations_for_domain( $domain ) { 
    811811 */
    812812function is_textdomain_loaded( $domain ) {
    813813        global $l10n;
    814         return isset( $l10n[$domain] );
     814        return ( ! empty( $l10n[ $domain ]->entries ) );
    815815}
    816816
    817817/**