Plugin Directory

Changeset 1811447


Ignore:
Timestamp:
01/29/2018 08:57:34 PM (8 years ago)
Author:
xnicoco
Message:

fixed torrent post title on upload (torrent will use internal name instead of hash for default post titles)

Location:
katracker/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • katracker/trunk/functions.php

    r1455925 r1811447  
    538538            update_torrent_meta( $attachment_id, $key, $value, true );
    539539        }
     540        $torrent_post = array(
     541            'ID'         => $attachment_id,
     542            'post_title' => $torrent->name()
     543        );
     544        wp_update_post( $torrent_post );
    540545    } else {
    541546        return false;
  • katracker/trunk/katracker.php

    r1811441 r1811447  
    44 * Description: The only full and all powerful, complete bittorrent tracker integration for wordpress.
    55 * Author: nicoco
    6  * Version: 1.1.11
     6 * Version: 1.1.12
    77 * License: GPL2
    88 * Text Domain: katracker
  • katracker/trunk/torrent/torrent-init.php

    r1811442 r1811447  
    5454}, 10, 4 );
    5555
     56// Allow uploading torrents to wordpress media library
     57add_filter( 'mime_types', function ( $existing_mimes ) {
     58    $existing_mimes['torrent'] = 'torrent/torrent';
     59    return $existing_mimes;
     60} );
    5661
    5762/**
     
    6974    return $path;
    7075}
    71 
    72 // Allow uploading torrents to wordpress media library
    73 add_filter( 'mime_types', function ( $existing_mimes ) {
    74     $existing_mimes['torrent'] = 'torrent/torrent';
    75     return $existing_mimes;
    76 } );
    7776
    7877// Add wordpress torrent media type
Note: See TracChangeset for help on using the changeset viewer.