rtMedia for WordPress, BuddyPress and bbPress - Version 3.7.27

Version Description

  • Fix warnings on BuddyPress activity page
  • Show add-on purchase link only when add-on is not purchased
  • More validations for admin settings
  • Fix for translations
Download this release

Release Info

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

Code changes from version 3.7.26 to 3.7.27

app/admin/RTMediaAdmin.php CHANGED
@@ -147,11 +147,13 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
147
  * @return void
148
  */
149
  public function rtmedia_admin_notices(){
150
- $this->upload_filetypes_error();
151
- $this->rtmedia_regenerate_thumbnail_notice();
152
- $this->rtmedia_addon_update_notice();
153
- $this->rtmedia_update_template_notice();
154
- $this->rtmedia_inspirebook_release_notice();
 
 
155
  }
156
 
157
  /**
147
  * @return void
148
  */
149
  public function rtmedia_admin_notices(){
150
+ if ( current_user_can( 'list_users' ) ){
151
+ $this->upload_filetypes_error();
152
+ $this->rtmedia_regenerate_thumbnail_notice();
153
+ $this->rtmedia_addon_update_notice();
154
+ $this->rtmedia_update_template_notice();
155
+ $this->rtmedia_inspirebook_release_notice();
156
+ }
157
  }
158
 
159
  /**
app/assets/css/admin.css CHANGED
@@ -111,7 +111,9 @@ a.toplevel_page_bp-media-settings div.wp-menu-image{
111
  .coming-soon.coming-soon-r:hover{background-position: 175px 0;}
112
 
113
  .bp-media-addon .product_footer{margin: 20px 0 0;overflow: hidden;}
114
- .bp-media-addon .add_to_cart_button{background: #C45200; color: #FFFFFF;display: inline-block;font-size: 18px;font-weight: bold; line-height: 1.4em; margin: 0 20px; padding: 4px 15px;text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6)}
 
 
115
  .bp-media-addon .product_footer .product_demo_link{font-size: 16px;margin: 8px 20px; font-weight: bold}
116
 
117
  .bp-media-addon .add_to_cart_button:hover{background: none repeat scroll 0 0 #D75A00;
111
  .coming-soon.coming-soon-r:hover{background-position: 175px 0;}
112
 
113
  .bp-media-addon .product_footer{margin: 20px 0 0;overflow: hidden;}
114
+ .bp-media-addon .add_to_cart_button, .bp-media-addon .rtm-addon-purchased{color: #FFFFFF;display: inline-block;font-size: 18px;font-weight: bold; line-height: 1.4em; margin: 0 20px; padding: 4px 15px;text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6)}
115
+ .bp-media-addon .add_to_cart_button{background: #C45200; }
116
+ .bp-media-addon .rtm-addon-purchased{background: #2EA2CC; `}
117
  .bp-media-addon .product_footer .product_demo_link{font-size: 16px;margin: 8px 20px; font-weight: bold}
118
 
119
  .bp-media-addon .add_to_cart_button:hover{background: none repeat scroll 0 0 #D75A00;
app/assets/js/admin.js CHANGED
@@ -58,30 +58,60 @@ jQuery(document).ready(function($) {
58
 
59
  /* Submit Request */
60
 
61
- jQuery('#bp-media-settings-boxes').on('submit', '#bp_media_settings_form,#rtmedia-settings-submit', function(e) {
62
  var return_code = true;
63
- var reg = new RegExp('^auto$|^[+-]?[0-9]+\\.?([0-9]+)?(px|em|ex|%|in|cm|mm|pt|pc)?$');
64
- jQuery("input[name*='defaultSizes']").each(function(el) {
65
- if (!reg.test(jQuery(this).val())) {
66
- alert("Invalid value for " + jQuery(this).attr('name').replace('rtmedia-options[', '').replace(']', '').replace(/_/g, ' '));
 
67
  return_code = false;
68
  return false;
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
  }
83
 
84
- });
 
 
 
85
 
86
  jQuery(document).on('click', "#bpm-services .encoding-try-now,#rtm-services .encoding-try-now", function(e) {
87
  e.preventDefault();
58
 
59
  /* Submit Request */
60
 
61
+ jQuery( '#bp-media-settings-boxes' ).on( 'submit', '#bp_media_settings_form, #rtmedia-settings-submit', function( e ) {
62
  var return_code = true;
63
+ var reg = new RegExp( '^[0-9]+$' );
64
+
65
+ jQuery( "input[name*='defaultSizes']" ).each( function( el ) {
66
+ if ( !reg.test( jQuery( this ).val() ) ) {
67
+ alert( "Invalid value for " + jQuery( this ).attr( 'name' ).replace( 'rtmedia-options[defaultSizes_', '' ).replace( ']', '' ).replace( /_/g, ' ').replace( /(\b)([a-zA-Z] )/g, function( firstLetter ) { return firstLetter.toUpperCase(); } ) );
68
  return_code = false;
69
  return false;
70
  }
71
+ } );
72
+
73
+ var general_videothumb = jQuery( 'input[name^="rtmedia-options[general_videothumbs]"]' );
74
+ if( return_code && typeof general_videothumb != "undefined" ) {
75
+ var error_msg = "";
76
+ var general_videothumb_val = 0;
77
+ if( general_videothumb.val() <= 0 ) {
78
+ error_msg += "Number of video thumbnails to be generated should be greater than 0 in image sizes settings. Setting it to round value 2.";
79
+ general_videothumb_val = 2;
80
+ } else if( !reg.test( general_videothumb.val() ) ) {
81
+ error_msg += 'Invalid value for Number of video thumbnails in image sizes settings. Setting it to round value ' + Math.round( general_videothumb.val() ) + ".";
82
+ general_videothumb_val = Math.round( general_videothumb.val() );
83
+ }
84
+ if( error_msg != "" ) {
85
+ alert( error_msg );
86
+ general_videothumb.val( general_videothumb_val );
87
+ return_code = false;
88
  return false;
89
+ }
90
  }
91
+
92
+ var general_perPageMedia = jQuery( 'input[name^="rtmedia-options[general_perPageMedia]"]' );
93
+ if( return_code && typeof general_perPageMedia != "undefined" ) {
94
+ var error_msg = "";
95
+ var general_perPageMedia_val = 0;
96
+ if( general_perPageMedia.val() < 1 ) {
97
+ error_msg += "Please enter positive integer value only. Setting number of media per page value to default value 10.";
98
+ general_perPageMedia_val = 10;
99
+ } else if( jQuery.isNumeric( general_perPageMedia.val() ) && ( Math.floor( general_perPageMedia.val() ) != general_perPageMedia.val() ) ) {
100
+ error_msg += "Please enter positive integer value only. Setting number of media per page value to round value " + Math.round( general_perPageMedia.val() ) + ".";
101
+ general_perPageMedia_val = Math.round( general_perPageMedia.val() );
102
+ }
103
+ if( error_msg != "" ){
104
+ alert( error_msg );
105
+ general_perPageMedia.val( general_perPageMedia_val );
106
+ return_code = false;
107
+ return false;
108
+ }
109
  }
110
 
111
+ if ( !return_code ) {
112
+ e.preventDefault();
113
+ }
114
+ } );
115
 
116
  jQuery(document).on('click', "#bpm-services .encoding-try-now,#rtm-services .encoding-try-now", function(e) {
117
  e.preventDefault();
app/helper/RTMediaAddon.php CHANGED
@@ -165,6 +165,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
165
  'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
166
  'buy_now' => 'https://rtcamp.com/store/rtmedia-photo-watermark/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
167
  'category' => 'photo',
 
168
  ),
169
  array(
170
  'title' => __( 'rtMedia Photo Tagging', 'rtmedia' ),
@@ -175,6 +176,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
175
  'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
176
  'buy_now' => 'https://rtcamp.com/store/rtmedia-photo-tagging/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
177
  'category' => 'photo',
 
178
  ),
179
  array(
180
  'title' => __( 'rtMedia Instagram', 'rtmedia' ),
@@ -185,6 +187,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
185
  'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
186
  'buy_now' => 'https://rtcamp.com/store/rtmedia-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
187
  'category' => 'photo',
 
188
  ),
189
  ),
190
  'video'=> array(
@@ -197,6 +200,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
197
  'demo_link' => 'http://demo.rtcamp.com/bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
198
  'buy_now' => 'https://rtcamp.com/store/rtmedia-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
199
  'category' => 'video',
 
200
  ),
201
  array(
202
  'title' => __( 'rtMedia FFMPEG Add-on', 'rtmedia' ),
@@ -207,6 +211,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
207
  'demo_link' => 'http://demo.rtcamp.com/bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
208
  'buy_now' => 'https://rtcamp.com/store/rtmedia-ffmpeg/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
209
  'category' => 'video',
 
210
  ),
211
  ),
212
  'membership'=> array(
@@ -218,6 +223,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
218
  'price' => '$99',
219
  'buy_now' => 'https://rtcamp.com/products/rtmedia-membership/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
220
  'category' => 'membership',
 
221
  ),
222
  ),
223
  );
@@ -300,12 +306,20 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
300
  'demo_link' => '',
301
  'buy_now' => '',
302
  'coming_soon' => false,
 
 
303
  );
304
  $args = wp_parse_args( $args, $defaults );
305
  extract( $args );
306
 
307
  $coming_soon ? ' coming-soon' : '';
308
 
 
 
 
 
 
 
309
  $coming_soon_div = ( $coming_soon ) ? $this->coming_soon_div() : '';
310
  $addon = '<div class="bp-media-addon">
311
  <a href="' . $product_link . '" title="' . $title . '" target="_blank">
@@ -316,8 +330,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
316
  ' . $desc . '
317
  </div>
318
  <div class="product_footer">
319
- <span class="price alignleft"><span class="amount">' . $price . '</span></span>
320
- <a class="add_to_cart_button alignright product_type_simple" href="' . $buy_now . '" target="_blank">' . __( 'Buy Now', 'rtmedia' ) . '</a>';
321
  if( $demo_link != '' ){
322
  $addon .= '<a class="alignleft product_demo_link" href="' . $demo_link . '" title="' . $title . '" target="_blank">' . __( 'Live Demo', 'rtmedia' ) . '</a>';
323
  }
165
  'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
166
  'buy_now' => 'https://rtcamp.com/store/rtmedia-photo-watermark/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
167
  'category' => 'photo',
168
+ 'purchased' => ( defined( 'RTMEDIA_WATERMARK_URL' ) || file_exists( WP_PLUGIN_DIR . '/rtmedia-photo-watermak/index.php' ) ) ? true : false,
169
  ),
170
  array(
171
  'title' => __( 'rtMedia Photo Tagging', 'rtmedia' ),
176
  'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
177
  'buy_now' => 'https://rtcamp.com/store/rtmedia-photo-tagging/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
178
  'category' => 'photo',
179
+ 'purchased' => ( defined( 'RTMEDIA_PHOTO_TAGGING_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-photo-tag/index.php' ) ) ? true : false,
180
  ),
181
  array(
182
  'title' => __( 'rtMedia Instagram', 'rtmedia' ),
187
  'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
188
  'buy_now' => 'https://rtcamp.com/store/rtmedia-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
189
  'category' => 'photo',
190
+ 'purchased' => ( defined( 'RTMEDIA_INSTAGRAM_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-instagram/index.php' ) ) ? true : false,
191
  ),
192
  ),
193
  'video'=> array(
200
  'demo_link' => 'http://demo.rtcamp.com/bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
201
  'buy_now' => 'https://rtcamp.com/store/rtmedia-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
202
  'category' => 'video',
203
+ 'purchased' => ( defined( 'RTMEDIA_KALTURA_PATH' ) || file_exists( WP_PLUGIN_DIR . '/bpm-kaltura/index.php' ) ) ? true : false,
204
  ),
205
  array(
206
  'title' => __( 'rtMedia FFMPEG Add-on', 'rtmedia' ),
211
  'demo_link' => 'http://demo.rtcamp.com/bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
212
  'buy_now' => 'https://rtcamp.com/store/rtmedia-ffmpeg/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
213
  'category' => 'video',
214
+ 'purchased' => ( defined( 'RTMEDIA_FFMPEG_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-ffmpeg/index.php' ) ) ? true : false,
215
  ),
216
  ),
217
  'membership'=> array(
223
  'price' => '$99',
224
  'buy_now' => 'https://rtcamp.com/products/rtmedia-membership/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
225
  'category' => 'membership',
226
+ 'purchased' => ( defined( 'RTMEDIA_MEMBERSHIP_URL' ) || file_exists( WP_PLUGIN_DIR . '/rtmedia-membership/index.php' ) ) ? true : false,
227
  ),
228
  ),
229
  );
306
  'demo_link' => '',
307
  'buy_now' => '',
308
  'coming_soon' => false,
309
+ 'category' => 'photo',
310
+ 'purchased' => false,
311
  );
312
  $args = wp_parse_args( $args, $defaults );
313
  extract( $args );
314
 
315
  $coming_soon ? ' coming-soon' : '';
316
 
317
+ if( $purchased ){
318
+ $purchase_link = '<span class="rtm-addon-purchased alignright product_type_simple">' . __( 'Purchased', 'rtmedia' ) . '</span>';
319
+ } else {
320
+ $purchase_link = '<a class="add_to_cart_button alignright product_type_simple" href="' . $buy_now . '" target="_blank">' . __( 'Buy Now', 'rtmedia' ) . '</a>';
321
+ }
322
+
323
  $coming_soon_div = ( $coming_soon ) ? $this->coming_soon_div() : '';
324
  $addon = '<div class="bp-media-addon">
325
  <a href="' . $product_link . '" title="' . $title . '" target="_blank">
330
  ' . $desc . '
331
  </div>
332
  <div class="product_footer">
333
+ <span class="price alignleft"><span class="amount">' . $price . '</span></span>' . $purchase_link ;
 
334
  if( $demo_link != '' ){
335
  $addon .= '<a class="alignleft product_demo_link" href="' . $demo_link . '" title="' . $title . '" target="_blank">' . __( 'Live Demo', 'rtmedia' ) . '</a>';
336
  }
app/helper/RTMediaSettings.php CHANGED
@@ -120,15 +120,26 @@ if ( ! class_exists( 'RTMediaSettings' ) ){
120
  */
121
  public function sanitize_before_save_options( $options ){
122
  $defaults = $this->get_default_options();
 
123
  foreach ( $defaults as $key => $value ) {
124
  if ( ! isset( $options[ $key ] ) ){
125
  $options[ $key ] = '0';
126
  }
127
  }
 
128
  if ( isset( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) > 10 ){
129
  $options['general_videothumbs'] = 10;
130
  }
131
 
 
 
 
 
 
 
 
 
 
132
  return $options;
133
  }
134
 
120
  */
121
  public function sanitize_before_save_options( $options ){
122
  $defaults = $this->get_default_options();
123
+
124
  foreach ( $defaults as $key => $value ) {
125
  if ( ! isset( $options[ $key ] ) ){
126
  $options[ $key ] = '0';
127
  }
128
  }
129
+
130
  if ( isset( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) > 10 ){
131
  $options['general_videothumbs'] = 10;
132
  }
133
 
134
+ // Checking if number of media perpage is integer or not
135
+ if( isset( $options[ 'general_perPageMedia' ] ) ) {
136
+ if( $options[ 'general_perPageMedia' ] < 1 ) {
137
+ $options[ 'general_perPageMedia' ] = 10;
138
+ } else if( !is_int( $options[ 'general_perPageMedia' ] ) ) {
139
+ $options[ 'general_perPageMedia' ] = round( $options[ 'general_perPageMedia' ] );
140
+ }
141
+ }
142
+
143
  return $options;
144
  }
145
 
app/helper/RTMediaThemes.php CHANGED
@@ -120,6 +120,22 @@ class RTMediaThemes {
120
  * @return void
121
  */
122
  public function rtmedia_themes_content(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  ?>
124
  <div class="row">
125
  <div class="columns large-12">
@@ -135,7 +151,7 @@ class RTMediaThemes {
135
  </p>
136
 
137
  <p>
138
- <span>Links: <a href="https://rtcamp.com/products/rtdating/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">Buy rtDating</a> | <a href="http://demo.rtcamp.com/rtmedia/?theme=rtDating" target="_blank">Live Demo</a> | <a href="http://docs.rtcamp.com/rtdating/" target="_blank">Documentation</a> | <a href="https://rtcamp.com/support/forum/premium-themes/" target="_blank">Support Forum</a></span>
139
  </p>
140
  </div>
141
  </div>
@@ -160,7 +176,7 @@ class RTMediaThemes {
160
  </p>
161
 
162
  <p>
163
- <span>Links: <a href="https://rtcamp.com/products/inspirebook/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">Buy InspireBook</a> | <a href="http://demo.rtcamp.com/rtmedia/?theme=InspireBook" target="_blank">Live Demo</a> | <a href="http://docs.rtcamp.com/inspirebook" target="_blank">Documentation</a> | <a href="http://community.rtcamp.com/c/premium-themes" target="_blank">Support Forum</a></span>
164
  </p>
165
  </div>
166
  </div>
120
  * @return void
121
  */
122
  public function rtmedia_themes_content(){
123
+
124
+
125
+ $rtdating = wp_get_theme( 'rtdating' );
126
+ if( $rtdating->exists() ){
127
+ $rtdating_purchase = '';
128
+ } else {
129
+ $rtdating_purchase = '<a href="https://rtcamp.com/products/rtdating/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">Buy rtDating</a> | ';
130
+ }
131
+
132
+ $inspirebook = wp_get_theme( 'inspirebook' );
133
+ if( $inspirebook->exists() ){
134
+ $inspirebook_purchase = '';
135
+ } else {
136
+ $inspirebook_purchase = '<a href="https://rtcamp.com/products/inspirebook/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">Buy InspireBook</a> | ';
137
+ }
138
+
139
  ?>
140
  <div class="row">
141
  <div class="columns large-12">
151
  </p>
152
 
153
  <p>
154
+ <span>Links: <?php echo $rtdating_purchase; ?> <a href="http://demo.rtcamp.com/rtmedia/?theme=rtDating" target="_blank">Live Demo</a> | <a href="http://docs.rtcamp.com/rtdating/" target="_blank">Documentation</a> | <a href="https://rtcamp.com/support/forum/premium-themes/" target="_blank">Support Forum</a></span>
155
  </p>
156
  </div>
157
  </div>
176
  </p>
177
 
178
  <p>
179
+ <span>Links: <?php echo $inspirebook_purchase; ?> <a href="http://demo.rtcamp.com/rtmedia/?theme=InspireBook" target="_blank">Live Demo</a> | <a href="http://docs.rtcamp.com/inspirebook" target="_blank">Documentation</a> | <a href="http://community.rtcamp.com/c/premium-themes" target="_blank">Support Forum</a></span>
180
  </p>
181
  </div>
182
  </div>
app/main/controllers/activity/RTMediaBuddyPressActivity.php CHANGED
@@ -269,7 +269,7 @@ class RTMediaBuddyPressActivity {
269
  for( $i = 0; $i < sizeof( $rtmedia_media_query ); $i++ ) {
270
  // Storing media_type of uploaded media to check whether all media are of same type or different and key is activity_id
271
  // Making activity_id array because there might be more then 1 media linked with activity
272
- if( !is_array( $rtmedia_media_type_array[ $rtmedia_media_query[ $i ]->activity_id ] ) ) {
273
  $rtmedia_media_type_array[ $rtmedia_media_query[ $i ]->activity_id ] = array();
274
  }
275
 
@@ -295,7 +295,12 @@ class RTMediaBuddyPressActivity {
295
  $media_const .= '_PLURAL';
296
  }
297
  $media_const .= '_LABEL';
298
- $media_str = constant( $media_const );
 
 
 
 
 
299
 
300
  // Updating activity based on count
301
  if( $count == 1 ) {
269
  for( $i = 0; $i < sizeof( $rtmedia_media_query ); $i++ ) {
270
  // Storing media_type of uploaded media to check whether all media are of same type or different and key is activity_id
271
  // Making activity_id array because there might be more then 1 media linked with activity
272
+ if( ! isset( $rtmedia_media_type_array[ $rtmedia_media_query[ $i ]->activity_id ] ) || ! is_array( $rtmedia_media_type_array[ $rtmedia_media_query[ $i ]->activity_id ] ) ) {
273
  $rtmedia_media_type_array[ $rtmedia_media_query[ $i ]->activity_id ] = array();
274
  }
275
 
295
  $media_const .= '_PLURAL';
296
  }
297
  $media_const .= '_LABEL';
298
+ if( defined( $media_const ) ){
299
+ $media_str = constant( $media_const );
300
+ } else {
301
+ $media_str = __( 'media', 'rtmedia' );
302
+ }
303
+
304
 
305
  // Updating activity based on count
306
  if( $count == 1 ) {
app/main/controllers/template/rt-template-functions.php CHANGED
@@ -2122,11 +2122,11 @@ add_action( 'rtmedia_album_gallery_actions', 'add_upload_button', 99 );
2122
  function add_upload_button() {
2123
  if ( function_exists( 'bp_is_blog_page' ) && ! bp_is_blog_page() ){
2124
  if ( function_exists( 'bp_is_user' ) && bp_is_user() && function_exists( 'bp_displayed_user_id' ) && bp_displayed_user_id() == get_current_user_id() ){
2125
- echo '<span class="primary rtmedia-upload-media-link" id="rtm_show_upload_ui" title="' . __( 'Upload Media', 'rtmedia' ) . '"><i class="rtmicon-upload rtmicon-fw"></i>' . __( 'Upload' ) . '</span>';
2126
  } else {
2127
  if ( function_exists( 'bp_is_group' ) && bp_is_group() ){
2128
  if ( can_user_upload_in_group() ){
2129
- echo '<span class="rtmedia-upload-media-link primary" id="rtm_show_upload_ui" title="' . __( 'Upload Media', 'rtmedia' ) . '"><i class="rtmicon-upload rtmicon-fw"></i>' . __( 'Upload' ) . '</span>';
2130
  }
2131
  }
2132
  }
2122
  function add_upload_button() {
2123
  if ( function_exists( 'bp_is_blog_page' ) && ! bp_is_blog_page() ){
2124
  if ( function_exists( 'bp_is_user' ) && bp_is_user() && function_exists( 'bp_displayed_user_id' ) && bp_displayed_user_id() == get_current_user_id() ){
2125
+ echo '<span class="primary rtmedia-upload-media-link" id="rtm_show_upload_ui" title="' . __( 'Upload Media', 'rtmedia' ) . '"><i class="rtmicon-upload rtmicon-fw"></i>' . __( 'Upload', 'rtmedia' ) . '</span>';
2126
  } else {
2127
  if ( function_exists( 'bp_is_group' ) && bp_is_group() ){
2128
  if ( can_user_upload_in_group() ){
2129
+ echo '<span class="rtmedia-upload-media-link primary" id="rtm_show_upload_ui" title="' . __( 'Upload Media', 'rtmedia' ) . '"><i class="rtmicon-upload rtmicon-fw"></i>' . __( 'Upload', 'rtmedia' ) . '</span>';
2130
  }
2131
  }
2132
  }
app/main/controllers/upload/RTMediaUploadView.php CHANGED
@@ -57,7 +57,7 @@ class RTMediaUploadView {
57
  }
58
  $up_privacy = $privacy = ""; //uploader privacy dropdown for uploader under rtMedia Media tab.
59
  if( is_rtmedia_privacy_enable () && ( ! isset( $rtmedia_query->is_upload_shortcode ) || $rtmedia_query->is_upload_shortcode === false) ) {
60
- if( isset( $rtmedia_query->query[ 'context' ] ) && $rtmedia_query->query[ 'context' ] == 'group'){
61
  // if the context is group, then set the media privacy to public
62
  $privacy = "<input type='hidden' name='privacy' value='0'/>";
63
  }else {
57
  }
58
  $up_privacy = $privacy = ""; //uploader privacy dropdown for uploader under rtMedia Media tab.
59
  if( is_rtmedia_privacy_enable () && ( ! isset( $rtmedia_query->is_upload_shortcode ) || $rtmedia_query->is_upload_shortcode === false) ) {
60
+ if( ( isset( $rtmedia_query->query[ 'context' ] ) && $rtmedia_query->query[ 'context' ] == 'group' ) || ( function_exists( 'bp_is_groups_component' ) && bp_is_groups_component() ) ){
61
  // if the context is group, then set the media privacy to public
62
  $privacy = "<input type='hidden' name='privacy' value='0'/>";
63
  }else {
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.26
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.27
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.1 + BuddyPress 2.1.1
9
- Stable tag: 3.7.26
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works mobile/tablets devices.
12
 
@@ -128,7 +128,13 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
128
 
129
  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.
130
 
131
- == 3.7.26 =
 
 
 
 
 
 
132
  * Fix persian and swedish translations
133
  * Update CSS and templates
134
 
@@ -878,8 +884,8 @@ Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_sou
878
 
879
  == Upgrade Notice ==
880
 
881
- = 3.7.26 =
882
- Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix persian and swedish translations, update CSS and templates
883
 
884
  == Sponsors ==
885
 
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.1 + BuddyPress 2.1.1
9
+ Stable tag: 3.7.27
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works mobile/tablets devices.
12
 
128
 
129
  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.
130
 
131
+ = 3.7.27 =
132
+ * Fix warnings on BuddyPress activity page
133
+ * Show add-on purchase link only when add-on is not purchased
134
+ * More validations for admin settings
135
+ * Fix for translations
136
+
137
+ = 3.7.26 =
138
  * Fix persian and swedish translations
139
  * Update CSS and templates
140
 
884
 
885
  == Upgrade Notice ==
886
 
887
+ = 3.7.27 =
888
+ Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix warnings on BuddyPress activity page, more validations for admin settings, fix for translations.
889
 
890
  == Sponsors ==
891