Ticket #25394: 25394.diff
File 25394.diff, 2.1 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/class-wp-upgrader.php
1011 1011 1012 1012 // A proper archive should have a style.css file in the single subdirectory 1013 1013 if ( ! file_exists( $working_directory . 'style.css' ) ) 1014 return new WP_Error( 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'], __( 'The theme is missing the <code>style.css</code>stylesheet.' ) );1014 return new WP_Error( 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'], __( 'The theme is missing the style.css stylesheet.' ) ); 1015 1015 1016 1016 $info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) ); 1017 1017 1018 1018 if ( empty( $info['Name'] ) ) 1019 return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'], __( "The <code>style.css</code>stylesheet doesn't contain a valid theme header." ) );1019 return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'], __( "The style.css stylesheet doesn't contain a valid theme header." ) ); 1020 1020 1021 1021 // If it's not a child theme, it must have at least an index.php to be legit. 1022 1022 if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) 1023 return new WP_Error( 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'], __( 'The theme is missing the <code>index.php</code>file.' ) );1023 return new WP_Error( 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'], __( 'The theme is missing the index.php file.' ) ); 1024 1024 1025 1025 return $source; 1026 1026 } … … 1265 1265 1266 1266 if ( ! $mo || ! $po ) 1267 1267 return new WP_Error( 'incompatible_archive_pomo', $this->strings['incompatible_archive'], 1268 __( 'The language pack is missing either the <code>.po</code> or <code>.mo</code>files.' ) );1268 __( 'The language pack is missing either the .po< or .mo files.' ) ); 1269 1269 1270 1270 return $source; 1271 1271 }