WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/21/2009 07:06:55 AM (12 years ago)
Author:
westi
Message:

Merge updated pomo code. Includes new NOOP_Translations class see #10971 props nbachiyski.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pomo/po.php

    r11626 r12079  
    33 * Class for working with PO files
    44 *
    5  * @version $Id: po.php 123 2009-05-13 19:35:43Z nbachiyski $
     5 * @version $Id: po.php 283 2009-09-23 16:21:51Z nbachiyski $
    66 * @package pomo
    77 * @subpackage po
     
    1717 * Routines for working with PO files
    1818 */
     19if ( !class_exists( 'PO' ) ):
    1920class PO extends Gettext_Translations {
    2021   
     
    317318            }
    318319        }
    319         if (array() == array_filter($entry->translations)) $entry->translations = array();
     320        if (array() == array_filter($entry->translations, create_function('$t', 'return $t || "0" === $t;'))) {
     321            $entry->translations = array();
     322        }
    320323        return array('entry' => $entry, 'lineno' => $lineno);
    321324    }
     
    358361    }
    359362}
    360 ?>
     363endif;
Note: See TracChangeset for help on using the changeset viewer.