Make WordPress Core

Changeset 10202


Ignore:
Timestamp:
12/14/2008 01:12:00 AM (18 years ago)
Author:
azaozz
Message:

Silence warnings when looking for translations for external plugins for TinyMCE, for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r10150 r10202  
    11621162                        if ( ! empty($mce_external_languages) ) {
    11631163                                foreach ( $mce_external_languages as $name => $path ) {
    1164                                         if ( is_file($path) && is_readable($path) ) {
     1164                                        if ( @is_file($path) && @is_readable($path) ) {
    11651165                                                include_once($path);
    1166                                                 $ext_plugins .= $strings;
     1166                                                $ext_plugins .= $strings . "\n";
    11671167                                                $loaded_langs[] = $name;
    11681168                                        }
    … …  
    11851185                                                $path = trailingslashit( realpath($path) );
    11861186
    1187                                         if ( is_file($path . $mce_locale . '.js') )
    1188                                                 $strings .= @file_get_contents($path . $mce_locale . '.js');
    1189 
    1190                                         if ( is_file($path . $mce_locale . '_dlg.js') )
    1191                                                 $strings .= @file_get_contents($path . $mce_locale . '_dlg.js');
     1187                                        if ( @is_file($path . $mce_locale . '.js') )
     1188                                                $strings .= @file_get_contents($path . $mce_locale . '.js') . "\n";
     1189
     1190                                        if ( @is_file($path . $mce_locale . '_dlg.js') )
     1191                                                $strings .= @file_get_contents($path . $mce_locale . '_dlg.js') . "\n";
    11921192
    11931193                                        if ( 'en' != $mce_locale && empty($strings) ) {
    1194                                                 if ( is_file($path . 'en.js') ) {
     1194                                                if ( @is_file($path . 'en.js') ) {
    11951195                                                        $str1 = @file_get_contents($path . 'en.js');
    1196                                                         $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 );
     1196                                                        $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n";
    11971197                                                }
    11981198
    1199                                                 if ( is_file($path . 'en_dlg.js') ) {
     1199                                                if ( @is_file($path . 'en_dlg.js') ) {
    12001200                                                        $str2 = @file_get_contents($path . 'en_dlg.js');
    1201                                                         $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 );
     1201                                                        $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n";
    12021202                                                }
    12031203                                        }
Note: See TracChangeset for help on using the changeset viewer.