Changeset 19965
- Timestamp:
- 02/21/2012 03:26:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r19712 r19965 110 110 111 111 //Translate fields 112 if ( $translate && ! empty($plugin_data['TextDomain']) ) { 113 if ( ! empty( $plugin_data['DomainPath'] ) ) 114 load_plugin_textdomain($plugin_data['TextDomain'], false, dirname($plugin_file). $plugin_data['DomainPath']); 115 else 116 load_plugin_textdomain($plugin_data['TextDomain'], false, dirname($plugin_file)); 117 118 foreach ( array('Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version') as $field ) 119 $plugin_data[ $field ] = translate($plugin_data[ $field ], $plugin_data['TextDomain']); 112 if ( $translate ) { 113 if ( $textdomain = $plugin_data['TextDomain'] ) { 114 if ( ! empty( $plugin_data['DomainPath'] ) ) 115 load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) . $plugin_data['DomainPath'] ); 116 else 117 load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) ); 118 } elseif ( in_array( basename( $plugin_file ), array( 'hello.php', 'akismet.php' ) ) ) { 119 $textdomain = 'default'; 120 } 121 if ( $textdomain ) { 122 foreach ( array( 'Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version' ) as $field ) 123 $plugin_data[ $field ] = translate( $plugin_data[ $field ], $textdomain ); 124 } 120 125 } 121 126
Note: See TracChangeset
for help on using the changeset viewer.