$status['errorCode'] = 'unable_to_connect_to_filesystem'; $status['errorMessage'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
// Pass through the error from WP_Filesystem if one was raised.
if($wp_filesystem instanceof WP_Filesystem_Base && is_wp_error($wp_filesystem->errors ) && $wp_filesystem->errors->has_errors()){ $status['errorMessage'] = esc_html($wp_filesystem->errors->get_error_message()); }
return$result; }
// This should be the same as $result above.
if(is_wp_error($skin->result )){ $skin->result->add_data( array( 'status' => 500 ));
if(is_null($result)){ // Pass through the error from WP_Filesystem if one was raised.
if($wp_filesystem instanceof WP_Filesystem_Base && is_wp_error($wp_filesystem->errors ) && $wp_filesystem->errors->has_errors() ){