Version Description
- Fix Media Url upload issue
- Fix delete attachment issue while reassigning user
- Add Social Sync in add-on list
Download this release
Release Info
Developer | rtcamp |
Plugin | rtMedia for WordPress, BuddyPress and bbPress |
Version | 3.7.36 |
Comparing to | |
See all releases |
Code changes from version 3.7.35 to 3.7.36
- app/admin/RTMediaAdmin.php +49 -2
- app/assets/img/rtmedia-social-sync-240x184.png +0 -0
- app/helper/RTMediaAddon.php +23 -1
- app/main/controllers/activity/RTMediaBuddyPressActivity.php +16 -4
- app/main/controllers/media/RTMediaMedia.php +20 -1
- app/main/controllers/shortcodes/RTMediaGalleryShortcode.php +7 -5
- index.php +1 -1
- readme.txt +9 -4
app/admin/RTMediaAdmin.php
CHANGED
@@ -104,6 +104,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
104 |
add_action( 'wp_ajax_rtmedia_hide_template_override_notice', array( $this, 'rtmedia_hide_template_override_notice' ), 1 );
|
105 |
add_action( 'admin_init', array( $this, 'rtmedia_bp_add_update_type' ) );
|
106 |
add_action( 'wp_ajax_rtmedia_hide_inspirebook_release_notice', array( $this, 'rtmedia_hide_inspirebook_release_notice' ), 1 );
|
|
|
107 |
$rtmedia_media_import = new RTMediaMediaSizeImporter(); // do not delete this line. We only need to create object of this class if we are in admin section
|
108 |
if ( class_exists( 'BuddyPress' ) ){
|
109 |
$rtmedia_activity_upgrade = new RTMediaActivityUpgrade();
|
@@ -153,9 +154,55 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
153 |
$this->rtmedia_addon_update_notice();
|
154 |
$this->rtmedia_update_template_notice();
|
155 |
$this->rtmedia_inspirebook_release_notice();
|
|
|
156 |
}
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
/**
|
160 |
* Show rtmedia inspirebook release notice.
|
161 |
*
|
@@ -174,11 +221,11 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
174 |
<p>
|
175 |
<span><a href="https://rtcamp.com/store/inspirebook/" target="_blank"><b>Meet
|
176 |
InspireBook</b></a> - First official rtMedia premium theme.</span>
|
177 |
-
<a href="#" onclick="
|
178 |
</p>
|
179 |
</div>
|
180 |
<script type="text/javascript">
|
181 |
-
function
|
182 |
var data = {action: 'rtmedia_hide_inspirebook_release_notice'};
|
183 |
jQuery.post( ajaxurl, data, function ( response ) {
|
184 |
response = response.trim();
|
104 |
add_action( 'wp_ajax_rtmedia_hide_template_override_notice', array( $this, 'rtmedia_hide_template_override_notice' ), 1 );
|
105 |
add_action( 'admin_init', array( $this, 'rtmedia_bp_add_update_type' ) );
|
106 |
add_action( 'wp_ajax_rtmedia_hide_inspirebook_release_notice', array( $this, 'rtmedia_hide_inspirebook_release_notice' ), 1 );
|
107 |
+
add_action( 'wp_ajax_rtmedia_hide_social_sync_notice', array( $this, 'rtmedia_hide_social_sync_notice' ), 1 );
|
108 |
$rtmedia_media_import = new RTMediaMediaSizeImporter(); // do not delete this line. We only need to create object of this class if we are in admin section
|
109 |
if ( class_exists( 'BuddyPress' ) ){
|
110 |
$rtmedia_activity_upgrade = new RTMediaActivityUpgrade();
|
154 |
$this->rtmedia_addon_update_notice();
|
155 |
$this->rtmedia_update_template_notice();
|
156 |
$this->rtmedia_inspirebook_release_notice();
|
157 |
+
$this->rtmedia_social_sync_release_notice();
|
158 |
}
|
159 |
}
|
160 |
|
161 |
+
/*
|
162 |
+
* Show social sync release notice admin notice.
|
163 |
+
*/
|
164 |
+
function rtmedia_social_sync_release_notice(){
|
165 |
+
$site_option = rtmedia_get_site_option( 'rtmedia_social_sync_release_notice' );
|
166 |
+
if ( ! $site_option || 'hide' != $site_option ){
|
167 |
+
rtmedia_update_site_option( 'rtmedia_social_sync_release_notice', 'show' );
|
168 |
+
?>
|
169 |
+
<div class="updated rtmedia-social-sync-notice">
|
170 |
+
<p>
|
171 |
+
<span>
|
172 |
+
<b>rtMedia: </b> Meet
|
173 |
+
<a href="https://rtcamp.com/products/rtmedia-social-sync/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">
|
174 |
+
<b>rtMedia Social Sync</b>
|
175 |
+
</a> which allows you to import media from your Facebook account.
|
176 |
+
</span>
|
177 |
+
<a href="#" onclick="rtmedia_hide_social_sync_notice()" style="float:right">Dismiss</a>
|
178 |
+
</p>
|
179 |
+
</div>
|
180 |
+
<script type="text/javascript">
|
181 |
+
function rtmedia_hide_social_sync_notice() {
|
182 |
+
var data = {action: 'rtmedia_hide_social_sync_notice'};
|
183 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
184 |
+
response = response.trim();
|
185 |
+
if ( response === "1" )
|
186 |
+
jQuery( '.rtmedia-social-sync-notice' ).remove();
|
187 |
+
} );
|
188 |
+
}
|
189 |
+
</script>
|
190 |
+
<?php
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
/*
|
195 |
+
* Hide social sync release notice
|
196 |
+
*/
|
197 |
+
function rtmedia_hide_social_sync_notice(){
|
198 |
+
if ( rtmedia_update_site_option( 'rtmedia_social_sync_release_notice', 'hide' ) ){
|
199 |
+
echo '1';
|
200 |
+
} else {
|
201 |
+
echo '0';
|
202 |
+
}
|
203 |
+
die();
|
204 |
+
}
|
205 |
+
|
206 |
/**
|
207 |
* Show rtmedia inspirebook release notice.
|
208 |
*
|
221 |
<p>
|
222 |
<span><a href="https://rtcamp.com/store/inspirebook/" target="_blank"><b>Meet
|
223 |
InspireBook</b></a> - First official rtMedia premium theme.</span>
|
224 |
+
<a href="#" onclick="rtmedia_hide_inspirebook_notice()" style="float:right">Dismiss</a>
|
225 |
</p>
|
226 |
</div>
|
227 |
<script type="text/javascript">
|
228 |
+
function rtmedia_hide_inspirebook_notice() {
|
229 |
var data = {action: 'rtmedia_hide_inspirebook_release_notice'};
|
230 |
jQuery.post( ajaxurl, data, function ( response ) {
|
231 |
response = response.trim();
|
app/assets/img/rtmedia-social-sync-240x184.png
ADDED
Binary file
|
app/helper/RTMediaAddon.php
CHANGED
@@ -155,6 +155,19 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
155 |
public function plugins_content( $args = '' ){
|
156 |
$img_src = RTMEDIA_URL . 'app/assets/img/';
|
157 |
$addons = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
'photo' => array(
|
159 |
array(
|
160 |
'title' => __( 'rtMedia Photo Watermark', 'rtmedia' ),
|
@@ -219,7 +232,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
219 |
'title' => __( 'rtMedia Membership Add-on', 'rtmedia' ),
|
220 |
'img_src' => $img_src . 'rtmedia-membership-240x184.png',
|
221 |
'product_link' => 'https://rtcamp.com/products/rtmedia-membership/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
222 |
-
'desc' => '<p>' . __( 'rtMedia Membership
|
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',
|
@@ -229,10 +242,19 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
229 |
);
|
230 |
$addons = apply_filters( 'rtmedia_addons', $addons );
|
231 |
|
|
|
232 |
$photo_addons = $addons['photo'];
|
233 |
$video_addons = $addons['video'];
|
234 |
$membership_addons = $addons['membership'];
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
echo '<h3>';
|
237 |
_e( 'rtMedia Addons for Photos', 'rtmedia' );
|
238 |
echo '</h3>';
|
155 |
public function plugins_content( $args = '' ){
|
156 |
$img_src = RTMEDIA_URL . 'app/assets/img/';
|
157 |
$addons = array(
|
158 |
+
'general' => array(
|
159 |
+
array(
|
160 |
+
'title' => __( 'rtMedia Social Sync', 'rtmedia' ),
|
161 |
+
'img_src' => $img_src . 'rtmedia-social-sync-240x184.png',
|
162 |
+
'product_link' => 'https://rtcamp.com/products/rtmedia-social-sync/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
163 |
+
'desc' => '<p>' . __( 'rtMedia Social Sync allows you to import media from your Facebook account.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'Facebook app is required to work this add-on.', 'rtmedia' ) . '</p>',
|
164 |
+
'price' => '$49',
|
165 |
+
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
166 |
+
'buy_now' => 'https://rtcamp.com/products/rtmedia-social-sync/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
167 |
+
'category' => 'general',
|
168 |
+
'purchased' => ( defined( 'RTMEDIA_SOCIAL_SYNC_URL' ) || file_exists( WP_PLUGIN_DIR . '/rtmedia-social-sync/index.php' ) ) ? true : false,
|
169 |
+
),
|
170 |
+
),
|
171 |
'photo' => array(
|
172 |
array(
|
173 |
'title' => __( 'rtMedia Photo Watermark', 'rtmedia' ),
|
232 |
'title' => __( 'rtMedia Membership Add-on', 'rtmedia' ),
|
233 |
'img_src' => $img_src . 'rtmedia-membership-240x184.png',
|
234 |
'product_link' => 'https://rtcamp.com/products/rtmedia-membership/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
235 |
+
'desc' => '<p>' . __( 'rtMedia Membership add-on provides membership functionality in your site.', 'rtmedia' ) . '</p> <p>' . __( 'It controls the number of files a member can upload and size of the files uploaded based on membership group.', 'rtmedia' ) . '</p>',
|
236 |
'price' => '$99',
|
237 |
'buy_now' => 'https://rtcamp.com/products/rtmedia-membership/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
238 |
'category' => 'membership',
|
242 |
);
|
243 |
$addons = apply_filters( 'rtmedia_addons', $addons );
|
244 |
|
245 |
+
$general_addons = $addons['general'];
|
246 |
$photo_addons = $addons['photo'];
|
247 |
$video_addons = $addons['video'];
|
248 |
$membership_addons = $addons['membership'];
|
249 |
|
250 |
+
echo '<h3>';
|
251 |
+
echo ( sizeof( $general_addons ) > 1 ) ? __( 'rtMedia Addons', 'rtmedia' ) : __( 'rtMedia Addon', 'rtmedia' );
|
252 |
+
echo '</h3>';
|
253 |
+
|
254 |
+
foreach ( $general_addons as $key => $value ) {
|
255 |
+
$this->addon( $value );
|
256 |
+
}
|
257 |
+
|
258 |
echo '<h3>';
|
259 |
_e( 'rtMedia Addons for Photos', 'rtmedia' );
|
260 |
echo '</h3>';
|
app/main/controllers/activity/RTMediaBuddyPressActivity.php
CHANGED
@@ -211,15 +211,27 @@ class RTMediaBuddyPressActivity {
|
|
211 |
$activity_allowedtags['audio']['title'] = array();
|
212 |
$activity_allowedtags['audio']['width'] = array();
|
213 |
$activity_allowedtags['audio']['poster'] = array();
|
214 |
-
|
|
|
|
|
|
|
215 |
$activity_allowedtags['div']['id'] = array();
|
216 |
$activity_allowedtags['div']['class'] = array();
|
217 |
-
|
|
|
|
|
|
|
218 |
$activity_allowedtags['a']['title'] = array();
|
219 |
$activity_allowedtags['a']['href'] = array();
|
220 |
-
|
|
|
|
|
|
|
221 |
$activity_allowedtags['ul']['class'] = array();
|
222 |
-
|
|
|
|
|
|
|
223 |
$activity_allowedtags['li']['class'] = array();
|
224 |
|
225 |
/* Legacy Code */
|
211 |
$activity_allowedtags['audio']['title'] = array();
|
212 |
$activity_allowedtags['audio']['width'] = array();
|
213 |
$activity_allowedtags['audio']['poster'] = array();
|
214 |
+
|
215 |
+
if( !isset( $activity_allowedtags['div'] ) ){
|
216 |
+
$activity_allowedtags['div'] = array();
|
217 |
+
}
|
218 |
$activity_allowedtags['div']['id'] = array();
|
219 |
$activity_allowedtags['div']['class'] = array();
|
220 |
+
|
221 |
+
if( !isset( $activity_allowedtags['a'] ) ){
|
222 |
+
$activity_allowedtags['a'] = array();
|
223 |
+
}
|
224 |
$activity_allowedtags['a']['title'] = array();
|
225 |
$activity_allowedtags['a']['href'] = array();
|
226 |
+
|
227 |
+
if( !isset( $activity_allowedtags['ul'] ) ){
|
228 |
+
$activity_allowedtags['ul'] = array();
|
229 |
+
}
|
230 |
$activity_allowedtags['ul']['class'] = array();
|
231 |
+
|
232 |
+
if( !isset( $activity_allowedtags['li'] ) ){
|
233 |
+
$activity_allowedtags['li'] = array();
|
234 |
+
}
|
235 |
$activity_allowedtags['li']['class'] = array();
|
236 |
|
237 |
/* Legacy Code */
|
app/main/controllers/media/RTMediaMedia.php
CHANGED
@@ -76,6 +76,7 @@ class RTMediaMedia {
|
|
76 |
*/
|
77 |
public function delete_hook() {
|
78 |
add_action( 'delete_attachment', array( $this, 'delete_wordpress_attachment' ) );
|
|
|
79 |
}
|
80 |
|
81 |
/**
|
@@ -266,7 +267,25 @@ class RTMediaMedia {
|
|
266 |
$this->delete( $media[ 0 ]->id, true );
|
267 |
}
|
268 |
}
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
/**
|
271 |
* Generic method to delete a media
|
272 |
*
|
76 |
*/
|
77 |
public function delete_hook() {
|
78 |
add_action( 'delete_attachment', array( $this, 'delete_wordpress_attachment' ) );
|
79 |
+
add_action( 'delete_user', array( $this, 'reassign_wordpress_user'), 10, 2 );
|
80 |
}
|
81 |
|
82 |
/**
|
267 |
$this->delete( $media[ 0 ]->id, true );
|
268 |
}
|
269 |
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Method to reassign media to another user while deleting user
|
273 |
+
*
|
274 |
+
* @param type $user_id, $reassign
|
275 |
+
*
|
276 |
+
*/
|
277 |
+
public function reassign_wordpress_user( $user_id , $reassign ){
|
278 |
+
if( $reassign != null || $reassign != '' ){
|
279 |
+
// Updating media author
|
280 |
+
$rtmedia_model = new RTMediaModel();
|
281 |
+
$rtmedia_model->update( array( 'media_author' => $reassign ), array( 'media_author' => $user_id ) );
|
282 |
+
|
283 |
+
// Updating user id from interaction
|
284 |
+
$rtmediainteraction = new RTMediaInteractionModel();
|
285 |
+
$rtmediainteraction->update( array( 'user_id' => $reassign ), array( 'user_id' => $user_id ) );
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
/**
|
290 |
* Generic method to delete a media
|
291 |
*
|
app/main/controllers/shortcodes/RTMediaGalleryShortcode.php
CHANGED
@@ -48,14 +48,16 @@ class RTMediaGalleryShortcode {
|
|
48 |
}
|
49 |
wp_localize_script ( 'rtmedia-backbone', 'template_url', $template_url );
|
50 |
$url = trailingslashit ( $_SERVER[ "REQUEST_URI" ] );
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
55 |
} else {
|
56 |
$url = trailingslashit ( $url ) . "upload/";
|
57 |
}
|
58 |
-
|
59 |
$params = array(
|
60 |
'url' => $url,
|
61 |
'runtimes' => 'html5,flash,html4',
|
48 |
}
|
49 |
wp_localize_script ( 'rtmedia-backbone', 'template_url', $template_url );
|
50 |
$url = trailingslashit ( $_SERVER[ "REQUEST_URI" ] );
|
51 |
+
$rtmedia_slug = "/".RTMEDIA_MEDIA_SLUG;
|
52 |
+
// check position of media slug from end of the URL
|
53 |
+
if ( strrpos ( $url, $rtmedia_slug ) !== false ) {
|
54 |
+
// split the url upto the last occurance of media slug
|
55 |
+
$url_upload = substr( $url, 0, strrpos ( $url, $rtmedia_slug ) );
|
56 |
+
$url = trailingslashit ( $url_upload ) . "upload/";
|
57 |
} else {
|
58 |
$url = trailingslashit ( $url ) . "upload/";
|
59 |
}
|
60 |
+
|
61 |
$params = array(
|
62 |
'url' => $url,
|
63 |
'runtimes' => 'html5,flash,html4',
|
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.
|
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.36
|
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.2.0
|
9 |
-
Stable tag: 3.7.
|
10 |
|
11 |
Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
|
12 |
|
@@ -128,11 +128,16 @@ 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.35 =
|
132 |
* Fix JSON API parameters bug.
|
133 |
|
134 |
= 3.7.34 =
|
135 |
-
* Added tabs support in rtMedia
|
136 |
* Fix activity upgrade
|
137 |
* Add klein theme in 3rd party theme list
|
138 |
* Fix uplaoder param in gallery shortcode database error
|
@@ -919,8 +924,8 @@ Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_sou
|
|
919 |
|
920 |
== Upgrade Notice ==
|
921 |
|
922 |
-
= 3.7.
|
923 |
-
Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix
|
924 |
|
925 |
== Sponsors ==
|
926 |
|
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.2.0
|
9 |
+
Stable tag: 3.7.36
|
10 |
|
11 |
Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on 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.36 =
|
132 |
+
* Fix Media Url upload issue
|
133 |
+
* Fix delete attachment issue while reassigning user
|
134 |
+
* Add Social Sync in add-on list
|
135 |
+
|
136 |
= 3.7.35 =
|
137 |
* Fix JSON API parameters bug.
|
138 |
|
139 |
= 3.7.34 =
|
140 |
+
* Added tabs support in rtMedia uploader
|
141 |
* Fix activity upgrade
|
142 |
* Add klein theme in 3rd party theme list
|
143 |
* Fix uplaoder param in gallery shortcode database error
|
924 |
|
925 |
== Upgrade Notice ==
|
926 |
|
927 |
+
= 3.7.36 =
|
928 |
+
Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix Media Url upload issue, fix delete attachment issue while reassigning user, add Social Sync in add-on list
|
929 |
|
930 |
== Sponsors ==
|
931 |
|