Skip to content

Instantly share code, notes, and snippets.

@2ndkauboy
Created March 7, 2017 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2ndkauboy/ab34bb71bee1303cc138982f810b34c4 to your computer and use it in GitHub Desktop.
Save 2ndkauboy/ab34bb71bee1303cc138982f810b34c4 to your computer and use it in GitHub Desktop.
<?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