-
-
Save 2ndkauboy/ab34bb71bee1303cc138982f810b34c4 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Allow Geodate uploads | |
* | |
* @package AllowGeodataUploads | |
* @author Bernhard Kau | |
* @license GPLv3 | |
* | |
* @wordpress-plugin | |
* Plugin Name: Allow Geodate uploads | |
* Description: Enable the users of your blog to upload Geodate files | |
* Version: 1.0.0 | |
* Author: Bernhard Kau | |
* Author URI: https://kau-boys.de | |
* License: GPLv3 | |
* License URI: http://www.gnu.org/licenses/gpl-3.0 | |
*/ | |
/** | |
* Add the geodata mime types to the allowed mimes | |
* | |
* @param array $mimes The allowed mimes. | |
* | |
* @return array | |
*/ | |
function allow_geodata_mime_types( $mimes ) { | |
$mimes['gpx'] = 'application/gpx+xml'; | |
$mimes['tcx'] = 'application/tcx+xml'; | |
return $mimes; | |
} | |
add_filter( 'upload_mimes', 'allow_geodata_mime_types' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment