Modify the MIME types of the Starter Templates
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 | |
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