$wp_filesystem->
delete( $from, true
);
return new WP_Error( 'insane_distro',
__( 'The update could not be unpacked'
) );
} /*
* Import $wp_version, $required_php_version, and $required_mysql_version from the new version.
* DO NOT globalize any variables imported from `version-current.php` in this function.
*
* BC Note: $wp_filesystem->wp_content_dir() returned unslashed pre-2.8.
*/
$versions_file =
trailingslashit( $wp_filesystem->
wp_content_dir() ) . 'upgrade/version-current.php';
if ( !
$wp_filesystem->
copy( $from .
$distro . 'wp-includes/version.php',
$versions_file ) ) { $wp_filesystem->
delete( $from, true
);
return new WP_Error( 'copy_failed_for_version_file',
__( 'The update cannot be installed because some files could not be copied. This is usually due to inconsistent file permissions.'
),
'wp-includes/version.php'
);
}