Ticket #14999: 14999.3.diff
File 14999.3.diff, 1.7 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/class-wp-upgrader.php
562 562 } 563 563 564 564 if ( ! $plugins_found ) 565 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'] );565 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __('No valid Plugins were found within the archive.') ); 566 566 567 567 return $source; 568 568 } … … 836 836 return $source; 837 837 838 838 if ( ! file_exists( $working_directory . 'style.css' ) ) // A proper archive should have a style.css file in the single subdirectory 839 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'] );839 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __('The theme is missing the <code>style.css</code> stylesheet.') ); 840 840 841 841 $info = get_theme_data( $working_directory . 'style.css' ); 842 842 if ( empty($info['Name']) ) 843 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'] );843 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __("The style.css doesn't contain a valid Theme Header.") ); 844 844 845 845 if ( empty($info['Template']) && ! file_exists( $working_directory . 'index.php' ) ) // If no template is set, it must have at least an index.php to be legit. 846 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'] );846 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __('The theme is missing the <code>index.php</code> file.') ); 847 847 848 848 return $source; 849 849 }