WordPress.org

Plugin Directory

Changeset 1700224


Ignore:
Timestamp:
07/21/17 10:53:03 (4 months ago)
Author:
rtcamp
Message:

Version update v1.1.2

Location:
transcoder/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • transcoder/trunk/admin/rt-transcoder-handler.php

    r1571799 r1700224  
    721721            $temp_name_array        = explode( '/', $temp_name ); 
    722722            $temp_name              = $temp_name_array[ count( $temp_name_array ) - 1 ]; 
    723             $thumbinfo['basename']  = $temp_name; 
     723            $thumbinfo['basename']  = apply_filters( 'transcoded_temp_filename', $temp_name ); 
    724724 
    725725            if ( 'wp-media' !== $post_thumbs_array['job_for'] ) { 
     
    727727            } 
    728728 
     729            // Create a file in the upload folder with given content. 
    729730            $thumb_upload_info = wp_upload_bits( $thumbinfo['basename'], null, $thumbresource['body'] ); 
    730731 
     
    842843                            $post_mime_type                 = 'mp4' === $new_wp_attached_file_pathinfo['extension'] ? 'video/mp4' : 'audio/mp3'; 
    843844                            try { 
    844                                 $file_bits = function_exists( 'wpcom_vip_file_get_contents' ) ? wpcom_vip_file_get_contents( $download_url ) : file_get_contents( $download_url ); // @codingStandardsIgnoreLine 
     845                                $response = function_exists( 'vip_safe_wp_remote_get' ) ? vip_safe_wp_remote_get( $download_url ) : wp_remote_get( $download_url ); // @codingStandardsIgnoreLine 
    845846                            } catch ( Exception $e ) { 
    846847                                $flag = $e->getMessage(); 
    847848                            } 
    848                             if ( $file_bits ) { 
     849 
     850                            $file_content = wp_remote_retrieve_body( $response ); 
     851 
     852                            if ( ! empty( $file_content ) ) { 
    849853 
    850854                                if ( 'wp-media' !== $job_for ) { 
     
    852856                                } 
    853857 
    854                                 $upload_info = wp_upload_bits( $new_wp_attached_file_pathinfo['basename'], null, $file_bits ); 
     858                                $upload_info = wp_upload_bits( $new_wp_attached_file_pathinfo['basename'], null, $file_content ); 
    855859 
    856860                                /** 
  • transcoder/trunk/readme.txt

    r1681811 r1700224  
    11=== Transcoder === 
    2 Contributors: rtcamp, mangeshp, chandrapatel, manishsongirkar36 
     2Contributors: rtcamp, mangeshp, chandrapatel, manishsongirkar36, bhargavbhandari90, kiranpotphode 
    33Tags: media, multimedia, audio, songs, music, video, ffmpeg, media-node, rtMedia, WordPress, kaltura, transcode, transcoder, encoding, encode 
    44Donate link: https://rtcamp.com/donate/ 
    55Requires at least: 4.1 
    66Tested up to: 4.8 
    7 Stable tag: 1.1.1 
     7Stable tag: 1.1.2 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    6363 
    6464== Changelog == 
     65= 1.1.2 [July 21, 2017] = 
     66* ENHANCEMENTS 
     67 
     68 * Added: Filter to allow adding a custom filename for the transcoded files [Documentation](https://rtmedia.io/docs/transcoder/developers-documentation/filters/#transcodedtempfilename) 
     69 * Replaced file_get_contents() with wp_remote_get() to have better server compatibility 
     70 
    6571= 1.1.1 [Jan 10, 2017] = 
    6672* FIXED 
     
    7682* ENHANCEMENTS 
    7783 
    78  * Added filters to disable the emails getting sent to users and administrators 
     84 * Added filters to disable the emails getting sent to users and administrators [Documentation](https://rtmedia.io/docs/transcoder/developers-documentation/filters/#rttsendnotification) 
    7985 * Added action before the transcoded thumbnails are stored 
    8086 * Added action before transcoded media is stored 
     
    130136 
    131137== Upgrade Notice == 
    132 = 1.1.1 = 
    133 Fix the false positive localhost checking bug. 
     138= 1.1.2 = 
     139Added new filter to allow adding a custom filename for the transcoded files and replaced file_get_contents() with wp_remote_get() to have better server compatibility 
  • transcoder/trunk/rt-transcoder.php

    r1571799 r1700224  
    44 * Plugin URI: https://rtmedia.io/transcoder/?utm_source=dashboard&utm_medium=plugin&utm_campaign=transcoder 
    55 * Description: Audio & video transcoding services for ANY WordPress website. Allows you to convert audio/video files of any format to a web-friendly format (mp3/mp4). 
    6  * Version: 1.1.1 
     6 * Version: 1.1.2 
    77 * Text Domain: transcoder 
    88 * Author: rtCamp 
     
    4040     * The version of the plugin 
    4141     */ 
    42     define( 'RT_TRANSCODER_VERSION', '1.1.1' ); 
     42    define( 'RT_TRANSCODER_VERSION', '1.1.2' ); 
    4343} 
    4444 
     
    4949 
    5050$rt_transcoder_admin = new RT_Transcoder_Admin(); 
     51 
     52/** 
     53* Add Settings/Docs link to plugins area. 
     54* 
     55* @since 1.1.2 
     56* 
     57* @param array $links Links array in which we would prepend our link. 
     58* @param string $file Current plugin basename. 
     59* 
     60* @return array Processed links. 
     61*/ 
     62function rtt_action_links( $links, $file ) { 
     63    // Return normal links if not plugin. 
     64    if ( plugin_basename( 'transcoder/rt-transcoder.php' ) !== $file ) { 
     65        return $links; 
     66    } 
     67 
     68    // Add a few links to the existing links array. 
     69    return array_merge( $links, array( 
     70        'settings' => '<a href="' . esc_url( admin_url( 'admin.php?page=rt-transcoder' ) ) . '">' . esc_html__( 'Settings', 'rtmedia' ) . '</a>', 
     71        'docs'     => '<a target="_blank" href="' . esc_url( 'https://rtmedia.io/docs/transcoder/' ) . '">' . esc_html__( 'Docs', 'rtmedia' ) . '</a>', 
     72    ) ); 
     73} 
     74 
     75add_filter( 'plugin_action_links', 'rtt_action_links', 11, 2 ); 
     76add_filter( 'network_admin_plugin_action_links', 'rtt_action_links', 11, 2 ); 
Note: See TracChangeset for help on using the changeset viewer.