Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.