Add support for .txt attachments

This commit is contained in:
Silvan Calarco 2015-11-10 18:47:41 +01:00
parent 127907e9f5
commit 9167bf18e2
2 changed files with 7 additions and 1 deletions

View File

@ -37,6 +37,12 @@ function add_custom_scripts() {
} }
add_action('template_redirect', 'add_custom_scripts'); add_action('template_redirect', 'add_custom_scripts');
function add_mime_types($mime_types) {
$mime_types['txt'] = 'text/plain';
return $mime_types;
}
add_filter('upload_mimes', 'add_mime_types', 1, 1);
function add_search_box($items, $args) { function add_search_box($items, $args) {
if($args->theme_location == 'header-menu') { if($args->theme_location == 'header-menu') {
ob_start(); ob_start();

View File

@ -3,7 +3,7 @@
Theme URI: http://openmamba.org/ Theme URI: http://openmamba.org/
Description: openmamba theme for wordpress Description: openmamba theme for wordpress
Author: Cristina Iurissevich, Silvan Calarco Author: Cristina Iurissevich, Silvan Calarco
Author URI: http://www.openmamba.org Author URI: http://openmamba.org
Template: responsive Template: responsive
Version: 1.0.0 Version: 1.0.0
*/ */