WordPress.org

Make WordPress Core

Ticket #14999: 14999.3.diff

File 14999.3.diff, 1.7 KB (added by dd32, 7 years ago)
  • wp-admin/includes/class-wp-upgrader.php

     
    562562                }
    563563
    564564                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.') );
    566566
    567567                return $source;
    568568        }
     
    836836                        return $source;
    837837
    838838                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.') );
    840840
    841841                $info = get_theme_data( $working_directory . 'style.css' );
    842842                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.") );
    844844
    845845                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.') );
    847847
    848848                return $source;
    849849        }