mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user