Version Description
- Fix upload dir filter
- Fix video max height in lightbox
- Fix shortcode issue with album uploader
Download this release
Release Info
Developer | rtcamp |
Plugin | rtMedia for WordPress, BuddyPress and bbPress |
Version | 3.8.17 |
Comparing to | |
See all releases |
Code changes from version 3.8.16 to 3.8.17
- app/main/controllers/privacy/RTMediaPrivacy.php +26 -2
- app/main/controllers/template/rt-template-functions.php +4 -2
- app/main/controllers/upload/RTMediaUploadView.php +1 -1
- app/main/controllers/upload/processors/RTMediaUploadFile.php +1 -1
- app/services/RTMediaEncoding.php +5 -2
- index.php +1 -1
- readme.txt +8 -3
app/main/controllers/privacy/RTMediaPrivacy.php
CHANGED
@@ -27,6 +27,7 @@ class RTMediaPrivacy {
|
|
27 |
add_filter( 'bp_activity_get_user_join_filter', array( $this, 'activity_privacy' ), 10, 6 );
|
28 |
add_filter( 'bp_use_legacy_activity_query', array( $this, 'enable_buddypress_privacy' ), 10, 3 );
|
29 |
add_filter( 'bp_activity_has_more_items', array( $this, 'enable_buddypress_load_more' ), 10, 1 );
|
|
|
30 |
}
|
31 |
}
|
32 |
|
@@ -249,13 +250,35 @@ class RTMediaPrivacy {
|
|
249 |
bp_core_load_template( apply_filters( 'bp_settings_screen_delete_account', 'members/single/plugins' ) );
|
250 |
}
|
251 |
|
252 |
-
|
|
|
|
|
|
|
253 |
if ( buddypress()->current_action != 'privacy' )
|
254 |
return;
|
255 |
|
256 |
if ( isset( $_POST[ "rtmedia-default-privacy" ] ) ) {
|
257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
$default_privacy = get_user_meta( get_current_user_id(), 'rtmedia-default-privacy', true );
|
260 |
if ( $default_privacy === false || $default_privacy === '' ) {
|
261 |
$default_privacy = get_rtmedia_default_privacy();
|
@@ -264,6 +287,7 @@ class RTMediaPrivacy {
|
|
264 |
?>
|
265 |
<form method="post">
|
266 |
<div class="rtm_bp_default_privacy">
|
|
|
267 |
<div class="section">
|
268 |
<div class="rtm-title"><h3><?php _e( 'Default Privacy', 'rtmedia' ); ?></h3></div>
|
269 |
<div class="rtm-privacy-levels">
|
27 |
add_filter( 'bp_activity_get_user_join_filter', array( $this, 'activity_privacy' ), 10, 6 );
|
28 |
add_filter( 'bp_use_legacy_activity_query', array( $this, 'enable_buddypress_privacy' ), 10, 3 );
|
29 |
add_filter( 'bp_activity_has_more_items', array( $this, 'enable_buddypress_load_more' ), 10, 1 );
|
30 |
+
add_action( 'bp_actions', array( $this,'rt_privacy_settings_action' ) );
|
31 |
}
|
32 |
}
|
33 |
|
250 |
bp_core_load_template( apply_filters( 'bp_settings_screen_delete_account', 'members/single/plugins' ) );
|
251 |
}
|
252 |
|
253 |
+
/**
|
254 |
+
* changing and saving of privacy setting save action
|
255 |
+
*/
|
256 |
+
function rt_privacy_settings_action() {
|
257 |
if ( buddypress()->current_action != 'privacy' )
|
258 |
return;
|
259 |
|
260 |
if ( isset( $_POST[ "rtmedia-default-privacy" ] ) ) {
|
261 |
+
$status=false;
|
262 |
+
if ( wp_verify_nonce( $_POST['rtmedia_member_settings_privacy'],'rtmedia_member_settings_privacy' ) ) {
|
263 |
+
$status = update_user_meta(get_current_user_id(), 'rtmedia-default-privacy', $_POST["rtmedia-default-privacy"]);
|
264 |
+
}
|
265 |
+
if(false == $status ) {
|
266 |
+
$feedback = __( 'No changes were made to your account.', 'rtmedia' );
|
267 |
+
$feedback_type = 'error';
|
268 |
+
} else if ( true == $status ) {
|
269 |
+
$feedback = __( 'Your default privacy settings saved successfully.', 'rtmedia' );
|
270 |
+
$feedback_type = 'success';
|
271 |
+
}
|
272 |
+
bp_core_add_message( $feedback, $feedback_type );
|
273 |
+
do_action( 'bp_core_general_settings_after_save' );
|
274 |
+
bp_core_redirect( bp_displayed_user_domain() . bp_get_settings_slug() . '/privacy/' );
|
275 |
}
|
276 |
+
}
|
277 |
+
|
278 |
+
function content() {
|
279 |
+
if ( buddypress()->current_action != 'privacy' )
|
280 |
+
return;
|
281 |
+
|
282 |
$default_privacy = get_user_meta( get_current_user_id(), 'rtmedia-default-privacy', true );
|
283 |
if ( $default_privacy === false || $default_privacy === '' ) {
|
284 |
$default_privacy = get_rtmedia_default_privacy();
|
287 |
?>
|
288 |
<form method="post">
|
289 |
<div class="rtm_bp_default_privacy">
|
290 |
+
<?php wp_nonce_field( 'rtmedia_member_settings_privacy', 'rtmedia_member_settings_privacy' ); ?>
|
291 |
<div class="section">
|
292 |
<div class="rtm-title"><h3><?php _e( 'Default Privacy', 'rtmedia' ); ?></h3></div>
|
293 |
<div class="rtm-privacy-levels">
|
app/main/controllers/template/rt-template-functions.php
CHANGED
@@ -303,8 +303,10 @@ function rtmedia_media( $size_flag = true, $echo = true, $media_size = "rt_media
|
|
303 |
$src = wp_get_attachment_image_src( $rtmedia_media->media_id, $media_size );
|
304 |
$html = "<img src='" . $src[ 0 ] . "' alt='" . $rtmedia_media->post_name . "' />";
|
305 |
} elseif ( $rtmedia_media->media_type == 'video' ) {
|
306 |
-
$
|
307 |
-
$
|
|
|
|
|
308 |
$html .= '<video src="' . wp_get_attachment_url( $rtmedia_media->media_id ) . '" ' . $size . ' type="video/mp4" class="wp-video-shortcode" id="bp_media_video_' . $rtmedia_media->id . '" controls="controls" preload="true"></video>';
|
309 |
$html .= '</div>';
|
310 |
} elseif ( $rtmedia_media->media_type == 'music' ) {
|
303 |
$src = wp_get_attachment_image_src( $rtmedia_media->media_id, $media_size );
|
304 |
$html = "<img src='" . $src[ 0 ] . "' alt='" . $rtmedia_media->post_name . "' />";
|
305 |
} elseif ( $rtmedia_media->media_type == 'video' ) {
|
306 |
+
$height = $rtmedia->options[ "defaultSizes_video_singlePlayer_height" ];
|
307 |
+
$height = ( $height * 75 ) / 640;
|
308 |
+
$size = " width=\"" . $rtmedia->options[ "defaultSizes_video_singlePlayer_width" ] . "\" height=\"" . $height . "%\" ";
|
309 |
+
$html = "<div id='rtm-mejs-video-container' style='width:" . $rtmedia->options[ "defaultSizes_video_singlePlayer_width" ] . "px;height:".$height."%; max-width:96%;max-height:80%;'>";
|
310 |
$html .= '<video src="' . wp_get_attachment_url( $rtmedia_media->media_id ) . '" ' . $size . ' type="video/mp4" class="wp-video-shortcode" id="bp_media_video_' . $rtmedia_media->id . '" controls="controls" preload="true"></video>';
|
311 |
$html .= '</div>';
|
312 |
} elseif ( $rtmedia_media->media_type == 'music' ) {
|
app/main/controllers/upload/RTMediaUploadView.php
CHANGED
@@ -43,7 +43,7 @@ class RTMediaUploadView {
|
|
43 |
global $rtmedia_query;
|
44 |
$album = '';
|
45 |
if ( apply_filters( 'rtmedia_render_select_album_upload', true ) ) {
|
46 |
-
if ( $rtmedia_query && isset( $rtmedia_query->media_query ) && isset( $rtmedia_query->media_query[ 'album_id' ] ) &&
|
47 |
$album = '<input class="rtmedia-current-album" type="hidden" name="rtmedia-current-album" value="' . $rtmedia_query->media_query[ 'album_id' ] . '" />';
|
48 |
} elseif ( is_rtmedia_album_enable() && $rtmedia_query && is_rtmedia_gallery() ) {
|
49 |
|
43 |
global $rtmedia_query;
|
44 |
$album = '';
|
45 |
if ( apply_filters( 'rtmedia_render_select_album_upload', true ) ) {
|
46 |
+
if ( $rtmedia_query && isset( $rtmedia_query->media_query ) && isset( $rtmedia_query->media_query[ 'album_id' ] ) && is_rtmedia_album( $rtmedia_query->media_query[ 'album_id' ] ) ) {
|
47 |
$album = '<input class="rtmedia-current-album" type="hidden" name="rtmedia-current-album" value="' . $rtmedia_query->media_query[ 'album_id' ] . '" />';
|
48 |
} elseif ( is_rtmedia_album_enable() && $rtmedia_query && is_rtmedia_gallery() ) {
|
49 |
|
app/main/controllers/upload/processors/RTMediaUploadFile.php
CHANGED
@@ -103,7 +103,7 @@ class RTMediaUploadFile {
|
|
103 |
$upload_dir[ 'url' ] = trailingslashit( str_replace( $upload_dir[ 'subdir' ], '', $upload_dir[ 'url' ] ) ) . $rtmedia_folder_name . '/' . $rtmedia_upload_prefix . $id . $upload_dir[ 'subdir' ];
|
104 |
}
|
105 |
|
106 |
-
$upload_dir = apply_filters( "rtmedia_filter_upload_dir", $upload_dir );
|
107 |
|
108 |
return $upload_dir;
|
109 |
}
|
103 |
$upload_dir[ 'url' ] = trailingslashit( str_replace( $upload_dir[ 'subdir' ], '', $upload_dir[ 'url' ] ) ) . $rtmedia_folder_name . '/' . $rtmedia_upload_prefix . $id . $upload_dir[ 'subdir' ];
|
104 |
}
|
105 |
|
106 |
+
$upload_dir = apply_filters( "rtmedia_filter_upload_dir", $upload_dir, $this->uploaded );
|
107 |
|
108 |
return $upload_dir;
|
109 |
}
|
app/services/RTMediaEncoding.php
CHANGED
@@ -684,16 +684,19 @@ class RTMediaEncoding {
|
|
684 |
$id = $this->media_author;
|
685 |
}
|
686 |
|
|
|
687 |
|
688 |
$upload_dir[ 'path' ] = trailingslashit(
|
689 |
str_replace( $upload_dir[ 'subdir' ], '', $upload_dir[ 'path' ] ) )
|
690 |
-
. '
|
691 |
$upload_dir[ 'subdir' ];
|
692 |
$upload_dir[ 'url' ] = trailingslashit(
|
693 |
str_replace( $upload_dir[ 'subdir' ], '', $upload_dir[ 'url' ] ) )
|
694 |
-
. '
|
695 |
. $upload_dir[ 'subdir' ];
|
696 |
|
|
|
|
|
697 |
return $upload_dir;
|
698 |
}
|
699 |
|
684 |
$id = $this->media_author;
|
685 |
}
|
686 |
|
687 |
+
$rtmedia_folder_name = apply_filters( 'rtmedia_upload_folder_name', 'rtMedia' );
|
688 |
|
689 |
$upload_dir[ 'path' ] = trailingslashit(
|
690 |
str_replace( $upload_dir[ 'subdir' ], '', $upload_dir[ 'path' ] ) )
|
691 |
+
. $rtmedia_folder_name . '/' . $rtmedia_upload_prefix . $id .
|
692 |
$upload_dir[ 'subdir' ];
|
693 |
$upload_dir[ 'url' ] = trailingslashit(
|
694 |
str_replace( $upload_dir[ 'subdir' ], '', $upload_dir[ 'url' ] ) )
|
695 |
+
. $rtmedia_folder_name . '/' . $rtmedia_upload_prefix . $id
|
696 |
. $upload_dir[ 'subdir' ];
|
697 |
|
698 |
+
$upload_dir = apply_filters( "rtmedia_filter_upload_dir", $upload_dir, $this->uploaded );
|
699 |
+
|
700 |
return $upload_dir;
|
701 |
}
|
702 |
|
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.8.
|
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.8.17
|
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: 4.3
|
9 |
-
Stable tag: 3.8.
|
10 |
|
11 |
Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
|
12 |
|
@@ -140,6 +140,11 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
|
|
140 |
|
141 |
== Changelog ==
|
142 |
|
|
|
|
|
|
|
|
|
|
|
143 |
= 3.8.16 =
|
144 |
* Update Persian translation and add Finnish translations
|
145 |
* Add rtMedia SEO add-on
|
@@ -1063,8 +1068,8 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
|
|
1063 |
|
1064 |
== Upgrade Notice ==
|
1065 |
|
1066 |
-
= 3.8.
|
1067 |
-
Requires BuddyPress 1.7 or higher, if using BuddyPress.
|
1068 |
|
1069 |
== Sponsors ==
|
1070 |
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Requires at least: WordPress 3.6
|
8 |
Tested up to: 4.3
|
9 |
+
Stable tag: 3.8.17
|
10 |
|
11 |
Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
|
12 |
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
+
= 3.8.17 =
|
144 |
+
* Fix upload dir filter
|
145 |
+
* Fix video max height in lightbox
|
146 |
+
* Fix shortcode issue with album uploader
|
147 |
+
|
148 |
= 3.8.16 =
|
149 |
* Update Persian translation and add Finnish translations
|
150 |
* Add rtMedia SEO add-on
|
1068 |
|
1069 |
== Upgrade Notice ==
|
1070 |
|
1071 |
+
= 3.8.17 =
|
1072 |
+
Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix upload dir filter, fix video max height in lightbox, fix shortcode issue with album uploader.
|
1073 |
|
1074 |
== Sponsors ==
|
1075 |
|