Last active
October 11, 2021 09:51
-
-
Save maheshwaghmare/47b688b3626043d47b399f07a00a962c to your computer and use it in GitHub Desktop.
Modify the MIME types of the Starter Templates
This file contains hidden or 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 | |
if ( ! function_exists( 'prefix_modify_mime_type' ) ) : | |
/** | |
* Modify the MIME types. | |
* | |
* @since x.x.x | |
* | |
* @param array $args File upload arguments. | |
* @return array. | |
*/ | |
function prefix_modify_mime_type( $args ) { | |
$args['mimes']['json'] = 'text/plain'; | |
return $args; | |
} | |
add_filter( 'ast_block_templates_wp_handle_sideload', 'prefix_modify_mime_type' ); | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment