Changeset 1811413
- Timestamp:
- 01/29/2018 07:38:56 PM (8 years ago)
- Location:
- katracker/trunk
- Files:
-
- 2 edited
-
katracker.php (modified) (1 diff)
-
torrent/torrent-init.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
katracker/trunk/katracker.php
r1455925 r1811413 2 2 /** 3 3 * Plugin Name: KaTracker 4 * Plugin URI: kateam.org/tracker5 4 * Description: The only full and all powerful, complete bittorrent tracker integration for wordpress. 6 5 * Author: nicoco 7 * Version: 1.0.9 8 * Author URI: kateam.org 6 * Version: 1.1.0 9 7 * License: GPL2 10 8 * Text Domain: katracker -
katracker/trunk/torrent/torrent-init.php
r1398530 r1811413 37 37 return $attachment; 38 38 } ); 39 40 // Allow uploading torrent file type 41 add_filter('upload_mimes', function($mimes) { 42 $mimes['torrent'] = 'torrent/torrent'; 43 return $mimes; 44 }, 10, 4 ); 45 46 add_filter('wp_check_filetype_and_ext', function($info, $tmpfile, $filename, $mimes) { 47 // extra checks to handle situations where "finfo mimetype" is different from "user mimetype" 48 global $wp_version; 49 50 $filetype = wp_check_filetype( $filename, $mimes ); 51 52 return [ 53 'ext' => $filetype['ext'], 54 'type' => $filetype['type'], 55 'proper_filename' => $data['proper_filename'] 56 ]; 57 return $ret; 58 }, 10, 4 ); 59 39 60 40 61 /**
Note: See TracChangeset
for help on using the changeset viewer.