PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.2
4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 All 200 releases
← All changes | includes/REST/Settings.php +5 -1 4.8.24.9.2 View file →
@@ -156,9 +156,13 @@
156 156 $args = [
157 157 'fetch_attachments' => true,
158 158 'existing_slug' => $existing_slug,
159 159 'action' => $action,
160 - 'file_type' => $files['file']['type']
160 + 'file_type' => $files['file']['type'],
161 + // The original upload name (with its extension) is the reliable
162 + // signal for choosing the parser; the browser-reported MIME on
163 + // $files['file']['type'] is not.
164 + 'file_name' => isset( $files['file']['name'] ) ? $files['file']['name'] : ''
161 165 ];
162 166
163 167 $wp_importer = new WPImport( $file, $args );
164 168