consolidate plugin/theme/core upgrade/install functions. Props DD32. see #7875

git-svn-id: https://develop.svn.wordpress.org/trunk@11005 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2009-04-19 19:36:28 +00:00
parent cff07d7f0d
commit 603fba4ad4
13 changed files with 1176 additions and 1182 deletions
+1 -4
View File
@@ -72,14 +72,11 @@ function delete_theme($template) {
return;
}
if ( $wp_filesystem->errors->get_error_code() ) {
return $wp_filesystem->errors;
}
if ( ! is_object($wp_filesystem) )
return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
if ( $wp_filesystem->errors->get_error_code() )
if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors);
//Get the base plugin folder