wp/wp-includes/l10n/class-wp-translation-file-mo.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
   152 			$translation = rtrim( $translation, "\0" );
   152 			$translation = rtrim( $translation, "\0" );
   153 
   153 
   154 			// Metadata about the MO file is stored in the first translation entry.
   154 			// Metadata about the MO file is stored in the first translation entry.
   155 			if ( '' === $original ) {
   155 			if ( '' === $original ) {
   156 				foreach ( explode( "\n", $translation ) as $meta_line ) {
   156 				foreach ( explode( "\n", $translation ) as $meta_line ) {
   157 					if ( '' === $meta_line ) {
   157 					if ( '' === $meta_line || ! str_contains( $meta_line, ':' ) ) {
   158 						continue;
   158 						continue;
   159 					}
   159 					}
   160 
   160 
   161 					list( $name, $value ) = array_map( 'trim', explode( ':', $meta_line, 2 ) );
   161 					list( $name, $value ) = array_map( 'trim', explode( ':', $meta_line, 2 ) );
   162 
   162