Created
December 14, 2018 13:48
-
-
Save maheshwaghmare/95af0f5b43fde8f44a7706853393375a to your computer and use it in GitHub Desktop.
MIME type for importing the XML file with text/xml it does not import due to application/xml due to real MIME type validation in WordPress v5.0.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$overrides = array( | |
... | |
... | |
'mimes' => array( | |
'xml' => 'text/xml', // Download XML file. | |
), | |
); | |
wp_handle_sideload( $file_args, $overrides ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment