rtMedia for WordPress, BuddyPress and bbPress - Version 3.6.2

Version Description

  • Bug fixes
Download this release

Release Info

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

Code changes from version 3.6.1.1 to 3.6.2

app/admin/RTMediaAdmin.php CHANGED
@@ -453,7 +453,7 @@ if ( ! class_exists ( 'RTMediaAdmin' ) ) {
453
  * @global string 'rtmedia'
454
  */
455
  public function menu () {
456
- add_menu_page ( 'rtMedia', 'rtMedia', 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ),RTMEDIA_URL."app/assets/img/rtmedia-logo.png" );
457
  add_submenu_page ( 'rtmedia-settings', __( 'Settings', 'rtmedia' ), __( 'Settings', 'rtmedia' ), 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ) );
458
  add_submenu_page ( 'rtmedia-settings', __( 'Addons', 'rtmedia' ), __( 'Addons', 'rtmedia' ), 'manage_options', 'rtmedia-addons', array( $this, 'addons_page' ) );
459
  add_submenu_page ( 'rtmedia-settings', __( 'Support', 'rtmedia' ), __( 'Support', 'rtmedia' ), 'manage_options', 'rtmedia-support', array( $this, 'support_page' ) );
453
  * @global string 'rtmedia'
454
  */
455
  public function menu () {
456
+ add_menu_page ( 'rtMedia', 'rtMedia', 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ),RTMEDIA_URL."app/assets/img/rtmedia-logo.png", "90.1" );
457
  add_submenu_page ( 'rtmedia-settings', __( 'Settings', 'rtmedia' ), __( 'Settings', 'rtmedia' ), 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ) );
458
  add_submenu_page ( 'rtmedia-settings', __( 'Addons', 'rtmedia' ), __( 'Addons', 'rtmedia' ), 'manage_options', 'rtmedia-addons', array( $this, 'addons_page' ) );
459
  add_submenu_page ( 'rtmedia-settings', __( 'Support', 'rtmedia' ), __( 'Support', 'rtmedia' ), 'manage_options', 'rtmedia-support', array( $this, 'support_page' ) );
app/assets/js/admin.js CHANGED
@@ -69,6 +69,14 @@ jQuery(document).ready(function($) {
69
  }
70
 
71
  });
 
 
 
 
 
 
 
 
72
  if (!return_code) {
73
  e.preventDefault();
74
  }
69
  }
70
 
71
  });
72
+ var general_videothumb = jQuery('input[name^="rtmedia-options[general_videothumbs]"]');
73
+ if( return_code && typeof general_videothumb != "undefined" ) {
74
+ if( general_videothumb.val() <= 0 ) {
75
+ alert("Number of video thumbnails to be generated should be greater than 0 in image sizes settings. ");
76
+ return_code = false;
77
+ return false;
78
+ }
79
+ }
80
  if (!return_code) {
81
  e.preventDefault();
82
  }
app/assets/js/rtMedia.backbone.js CHANGED
@@ -280,7 +280,7 @@ jQuery(function($) {
280
 
281
  uploaderObj.uploader.bind('UploadComplete', function(up, files) {
282
  activity_id = -1;
283
- if( rtmedia_gallery_reload_on_upload =='1'){ //reload gallery view when upload completes if enabled( by default enabled)
284
  galleryObj.reloadView();
285
  }
286
  jQuery('.start-media-upload').hide();
@@ -593,6 +593,7 @@ jQuery(document).ready(function($) {
593
  var ext_array = objUploadView.uploader.settings.filters[0].extensions.split(',');
594
  if(tmp_array.length > 1){
595
  var ext= tmp_array[tmp_array.length - 1];
 
596
  if( jQuery.inArray( ext ,ext_array) === -1){
597
  return true;
598
  }
280
 
281
  uploaderObj.uploader.bind('UploadComplete', function(up, files) {
282
  activity_id = -1;
283
+ if( typeof rtmedia_gallery_reload_on_upload != "undefined" && rtmedia_gallery_reload_on_upload =='1'){ //reload gallery view when upload completes if enabled( by default enabled)
284
  galleryObj.reloadView();
285
  }
286
  jQuery('.start-media-upload').hide();
593
  var ext_array = objUploadView.uploader.settings.filters[0].extensions.split(',');
594
  if(tmp_array.length > 1){
595
  var ext= tmp_array[tmp_array.length - 1];
596
+ ext = ext.toLowerCase();
597
  if( jQuery.inArray( ext ,ext_array) === -1){
598
  return true;
599
  }
app/main/controllers/api/RTMediaJsonApi.php CHANGED
@@ -960,11 +960,11 @@ class RTMediaJsonApi{
960
  $tmp_name = UPLOAD_DIR_LOOK . $title;
961
  $file = $tmp_name . '.'.$image_type;
962
  $success = file_put_contents($file, $rtmedia_file);
963
- add_filter('upload_dir', 'api_new_look_upload_dir');
964
  // echo $file;
965
  $new_look = wp_upload_bits($title.'.'.$image_type, '', $rtmedia_file);
966
  $new_look['type'] = 'image/'.$image_type;
967
- remove_filter('upload_dir', 'api_new_look_upload_dir');
968
  foreach ( $new_look as $key => $value ){
969
  $new_look[0][$key] = $value;
970
  unset($new_look[$key]);
@@ -988,7 +988,9 @@ class RTMediaJsonApi{
988
  $rtmedia = new RTMediaMedia();
989
  $rtupload = $rtmedia->add( $uploaded, $new_look );
990
  $id = rtmedia_media_id($rtupload[0]);
991
- wp_set_post_terms( $id , $_POST["tags"] , 'media-category',true);
 
 
992
  $media = $rtmedia->model->get ( array( 'id' => $rtupload[ 0 ] ) );
993
  $rtMediaNav = new RTMediaNav();
994
  $perma_link = "";
@@ -1173,7 +1175,7 @@ class RTMediaJsonApi{
1173
  }
1174
 
1175
  }
1176
- function api_new_look_upload_dir($args){
1177
  if( !empty($args) || !is_array($args) || empty($_POST['token']) ){
1178
  foreach( $args as $key => $arg ){
1179
  $replacestring = 'uploads/rtMedia/users/'.$this->rtmediajsonapifunction->rtmedia_api_get_user_id_from_token($_POST['token']);
@@ -1184,4 +1186,4 @@ class RTMediaJsonApi{
1184
  return $args;
1185
  }
1186
  }
1187
- }
960
  $tmp_name = UPLOAD_DIR_LOOK . $title;
961
  $file = $tmp_name . '.'.$image_type;
962
  $success = file_put_contents($file, $rtmedia_file);
963
+ add_filter('upload_dir', array($this, 'api_new_media_upload_dir'));
964
  // echo $file;
965
  $new_look = wp_upload_bits($title.'.'.$image_type, '', $rtmedia_file);
966
  $new_look['type'] = 'image/'.$image_type;
967
+ remove_filter('upload_dir', array($this, 'api_new_media_upload_dir'));
968
  foreach ( $new_look as $key => $value ){
969
  $new_look[0][$key] = $value;
970
  unset($new_look[$key]);
988
  $rtmedia = new RTMediaMedia();
989
  $rtupload = $rtmedia->add( $uploaded, $new_look );
990
  $id = rtmedia_media_id($rtupload[0]);
991
+ if(!empty($_POST['tags'])){
992
+ wp_set_post_terms( $id , $_POST["tags"] , 'media-category',true);
993
+ }
994
  $media = $rtmedia->model->get ( array( 'id' => $rtupload[ 0 ] ) );
995
  $rtMediaNav = new RTMediaNav();
996
  $perma_link = "";
1175
  }
1176
 
1177
  }
1178
+ function api_new_media_upload_dir($args){
1179
  if( !empty($args) || !is_array($args) || empty($_POST['token']) ){
1180
  foreach( $args as $key => $arg ){
1181
  $replacestring = 'uploads/rtMedia/users/'.$this->rtmediajsonapifunction->rtmedia_api_get_user_id_from_token($_POST['token']);
1186
  return $args;
1187
  }
1188
  }
1189
+ }
app/main/controllers/template/RTMediaNav.php CHANGED
@@ -68,7 +68,10 @@ class RTMediaNav {
68
 
69
  function admin_nav () {
70
  global $wp_admin_bar;
71
-
 
 
 
72
  if ( function_exists ( "bp_use_wp_admin_bar" ) && ! bp_use_wp_admin_bar () )
73
  return;
74
 
68
 
69
  function admin_nav () {
70
  global $wp_admin_bar;
71
+ global $rtmedia;
72
+ if( ( ! isset( $rtmedia->options['buddypress_enableOnProfile'] ) ) || ( isset( $rtmedia->options['buddypress_enableOnProfile'] ) && $rtmedia->options['buddypress_enableOnProfile'] == '0' ) ) {
73
+ return;
74
+ }
75
  if ( function_exists ( "bp_use_wp_admin_bar" ) && ! bp_use_wp_admin_bar () )
76
  return;
77
 
app/main/controllers/template/rt-template-functions.php CHANGED
@@ -378,8 +378,12 @@ function rtmedia_album_image ( $size = 'thumbnail', $id = false) {
378
  if(isset($rtmedia_query->query['context_id']) && isset( $rtmedia_query->query['context'] ) && $rtmedia_query->query['context'] != "group" ){
379
  $media = $model->get_media ( array( 'album_id' => $id, 'media_type' => 'photo', 'media_author' => $rtmedia_query->query['context_id'] ), 0, 1 );
380
  } else {
381
- $media = $model->get_media ( array( 'album_id' => $id, 'media_type' => 'photo'), 0, 1 );
382
- }
 
 
 
 
383
 
384
  if ( $media ) {
385
  $src = rtmedia_image ( $size, $media[ 0 ]->id ,false);
378
  if(isset($rtmedia_query->query['context_id']) && isset( $rtmedia_query->query['context'] ) && $rtmedia_query->query['context'] != "group" ){
379
  $media = $model->get_media ( array( 'album_id' => $id, 'media_type' => 'photo', 'media_author' => $rtmedia_query->query['context_id'] ), 0, 1 );
380
  } else {
381
+ if( isset( $rtmedia_query->query['context_id'] ) && isset( $rtmedia_query->query['context'] ) && $rtmedia_query->query['context'] == "group" ) {
382
+ $media = $model->get_media ( array( 'album_id' => $id, 'media_type' => 'photo', 'context_id' => $rtmedia_query->query['context_id'] ), 0, 1 );
383
+ } else {
384
+ $media = $model->get_media ( array( 'album_id' => $id, 'media_type' => 'photo'), 0, 1 );
385
+ }
386
+ }
387
 
388
  if ( $media ) {
389
  $src = rtmedia_image ( $size, $media[ 0 ]->id ,false);
app/main/routers/query/RTMediaQuery.php CHANGED
@@ -551,6 +551,8 @@ class RTMediaQuery {
551
  }
552
  }
553
 
 
 
554
  if ( $this->is_album_gallery () ) {
555
 
556
  if ( isset ( $author ) ) {
551
  }
552
  }
553
 
554
+ $this->media_query = apply_filters( 'rtmedia_media_query', $this->media_query );
555
+
556
  if ( $this->is_album_gallery () ) {
557
 
558
  if ( isset ( $author ) ) {
index.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: http://rtcamp.com/buddypress-media/?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.6.1.1
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/buddypress-media/?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.6.2
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 3.7 + BuddyPress 1.8.1
9
- Stable tag: 3.6.1.1
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works mobile/tablets devices.
12
 
@@ -132,6 +132,9 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
132
  == Changelog ==
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
  = 3.6.1.1 =
136
  * Bug fixes
137
 
@@ -697,7 +700,7 @@ Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_sou
697
 
698
  == Upgrade Notice ==
699
 
700
- = 3.6.1.1 =
701
  Requires BuddyPress 1.7 or higher, if using BuddyPress. Bug fixes.
702
 
703
  == Sponsors ==
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: WordPress 3.7 + BuddyPress 1.8.1
9
+ Stable tag: 3.6.2
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works mobile/tablets devices.
12
 
132
  == Changelog ==
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
+ = 3.6.2 =
136
+ * Bug fixes
137
+
138
  = 3.6.1.1 =
139
  * Bug fixes
140
 
700
 
701
  == Upgrade Notice ==
702
 
703
+ = 3.6.2 =
704
  Requires BuddyPress 1.7 or higher, if using BuddyPress. Bug fixes.
705
 
706
  == Sponsors ==