Make WordPress Core

Ticket #25394: 25394.diff

File 25394.diff, 2.1 KB (added by JustinSainton, 11 years ago)
  • wp-admin/includes/class-wp-upgrader.php

     
    10111011
    10121012                // A proper archive should have a style.css file in the single subdirectory
    10131013                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.' ) );
    10151015
    10161016                $info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) );
    10171017
    10181018                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." ) );
    10201020
    10211021                // If it's not a child theme, it must have at least an index.php to be legit.
    10221022                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.' ) );
    10241024
    10251025                return $source;
    10261026        }
     
    12651265
    12661266                if ( ! $mo || ! $po )
    12671267                        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.' ) );
    12691269
    12701270                return $source;
    12711271        }