rtMedia for WordPress, BuddyPress and bbPress - Version 3.7.12

Version Description

  • Fix rename non-english characters to valid english characters for file upload
  • Fix Add media button glitches in BuddyPress activity
Download this release

Release Info

Developer rtcamp
Plugin Icon 128x128 rtMedia for WordPress, BuddyPress and bbPress
Version 3.7.12
Comparing to
See all releases

Code changes from version 3.7.11 to 3.7.12

app/assets/js/rtMedia.backbone.js CHANGED
@@ -693,8 +693,8 @@ jQuery( document ).ready( function ( $ ) {
693
  $('#rtmedia-whts-new-upload-container > div' ).css( 'top','0' );
694
  $('#rtmedia-whts-new-upload-container > div' ).css( 'left','0' );
695
  }
696
- }, 1000);
697
-
698
  $( "#whats-new-form" ).on( 'click', '#rtmedia-add-media-button-post-update', function ( e ) {
699
  objUploadView.uploader.refresh();
700
  $('#rtmedia-whts-new-upload-container > div' ).css( 'top','0' );
693
  $('#rtmedia-whts-new-upload-container > div' ).css( 'top','0' );
694
  $('#rtmedia-whts-new-upload-container > div' ).css( 'left','0' );
695
  }
696
+ }, 100 );
697
+
698
  $( "#whats-new-form" ).on( 'click', '#rtmedia-add-media-button-post-update', function ( e ) {
699
  objUploadView.uploader.refresh();
700
  $('#rtmedia-whts-new-upload-container > div' ).css( 'top','0' );
app/main/controllers/template/rt-template-functions.php CHANGED
@@ -2287,13 +2287,6 @@ function rtmedia_admin_premium_page( $page ) {
2287
  <p><?php _e( 'Without leaving your WordPress dashboard, you can contact us for help using a support form.', 'rtmedia' ); ?></p>
2288
  </div>
2289
  </div>
2290
- <div class="row">
2291
- <div class="columns large-1 rtm-premium-icon-pro"><i class="rtmicon-code rtmicon-3x rtmicon-fw"></i></div>
2292
- <div class="columns large-10">
2293
- <h2><?php _e( 'Premium & Open-Source', 'rtmedia' ); ?></h2>
2294
- <p><?php echo __( "Developers get full control over rtMedia-PRO's source. They'll get access to " ) . "<a href='http://git.rtcamp.com/' target='_blank'>git.rtcamp.com</a>"; ?></p>
2295
- </div>
2296
- </div>
2297
  </br>
2298
  <div class="row">
2299
  <div class="columns large-12 rtmedia-upgrade">
@@ -2734,4 +2727,25 @@ function rtmedia_media_gallery_lightbox_template_request( $class ){
2734
  function rtmedia_get_current_blog_url( $domain ) {
2735
  $domain = get_home_url(get_current_blog_id() );
2736
  return $domain;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2737
  }
2287
  <p><?php _e( 'Without leaving your WordPress dashboard, you can contact us for help using a support form.', 'rtmedia' ); ?></p>
2288
  </div>
2289
  </div>
 
 
 
 
 
 
 
2290
  </br>
2291
  <div class="row">
2292
  <div class="columns large-12 rtmedia-upgrade">
2727
  function rtmedia_get_current_blog_url( $domain ) {
2728
  $domain = get_home_url(get_current_blog_id() );
2729
  return $domain;
2730
+ }
2731
+
2732
+ //Removing special characters and replacing accent characters with ASCII characters in filename before upload to server
2733
+ add_action( 'rtmedia_upload_set_post_object', 'rtmedia_upload_sanitize_filename_before_upload', 10 );
2734
+
2735
+ function rtmedia_upload_sanitize_filename_before_upload() {
2736
+ add_action( 'sanitize_file_name', 'sanitize_filename_before_upload', 10, 1 );
2737
+ }
2738
+
2739
+ function sanitize_filename_before_upload( $filename ) {
2740
+ $info = pathinfo( $filename );
2741
+ $ext = empty( $info[ 'extension' ] ) ? '' : '.' . $info[ 'extension' ];
2742
+ $name = basename( $filename, $ext );
2743
+ $finalFileName = $name;
2744
+
2745
+ $special_chars = array( "?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr( 0 ) );
2746
+ $special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $finalFileName );
2747
+ $string = str_replace( $special_chars, '-', $finalFileName );
2748
+ $string = preg_replace( '/\+/', '', $string );
2749
+
2750
+ return remove_accents( $string ) . $ext;
2751
  }
app/main/controllers/upload/RTMediaUploadEndpoint.php CHANGED
@@ -33,6 +33,7 @@ class RTMediaUploadEndpoint {
33
  $redirect_url = "";
34
  if ( wp_verify_nonce( $nonce, 'rtmedia_upload_nonce' ) ){
35
  $model = new RTMediaUploadModel();
 
36
  $this->upload = $model->set_post_object();
37
  if ( isset ( $_POST[ 'activity_id' ] ) && $_POST[ 'activity_id' ] != - 1 ){
38
  $this->upload[ 'activity_id' ] = $_POST[ 'activity_id' ];
33
  $redirect_url = "";
34
  if ( wp_verify_nonce( $nonce, 'rtmedia_upload_nonce' ) ){
35
  $model = new RTMediaUploadModel();
36
+ do_action( 'rtmedia_upload_set_post_object' );
37
  $this->upload = $model->set_post_object();
38
  if ( isset ( $_POST[ 'activity_id' ] ) && $_POST[ 'activity_id' ] != - 1 ){
39
  $this->upload[ 'activity_id' ] = $_POST[ 'activity_id' ];
index.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: http://rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
  Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
- Version: 3.7.11
8
  Author: rtCamp
9
  Text Domain: rtmedia
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: http://rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
  Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
+ Version: 3.7.12
8
  Author: rtCamp
9
  Text Domain: rtmedia
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
readme.txt CHANGED
@@ -6,7 +6,7 @@ License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: WordPress 4.0 + BuddyPress 2.0
9
- Stable tag: 3.7.11
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works mobile/tablets devices.
12
 
@@ -133,6 +133,10 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
133
 
134
  Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit rtMedia's Features page") to get some details about future releases.
135
 
 
 
 
 
136
  = 3.7.11 =
137
  * Fix BuddyPress load more issue
138
 
@@ -817,8 +821,8 @@ Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_sou
817
 
818
  == Upgrade Notice ==
819
 
820
- = 3.7.11 =
821
- Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix BuddyPress load more issue.
822
 
823
  == Sponsors ==
824
 
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: WordPress 4.0 + BuddyPress 2.0
9
+ Stable tag: 3.7.12
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works mobile/tablets devices.
12
 
133
 
134
  Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit rtMedia's Features page") to get some details about future releases.
135
 
136
+ = 3.7.12 =
137
+ * Fix rename non-english characters to valid english characters for file upload
138
+ * Fix Add media button glitches in BuddyPress activity
139
+
140
  = 3.7.11 =
141
  * Fix BuddyPress load more issue
142
 
821
 
822
  == Upgrade Notice ==
823
 
824
+ = 3.7.12 =
825
+ Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix rename non-english characters to valid english characters for file upload, fix Add media button glitches in BuddyPress activity.
826
 
827
  == Sponsors ==
828