rtMedia for WordPress, BuddyPress and bbPress - Version 3.7.42

Version Description

  • Added rtmedia_get_media_description function
  • js fix for uploader tabs
  • Update support link and github link
  • Fix multisite global album does not exist issue
Download this release

Release Info

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

Code changes from version 3.7.41 to 3.7.42

app/assets/js/rtMedia.js CHANGED
@@ -580,9 +580,9 @@ jQuery('document').ready(function($) {
580
jQuery( '.rtm-uploader-tabs li' ).click( function( e ){
581
if( ! jQuery( this ).hasClass( 'active' ) ){
582
jQuery( this ).siblings().removeClass( 'active' );
583
- jQuery( '.rtm-uploader-tabs' ).siblings().hide();
584
class_name = jQuery( this ).attr( 'class' );
585
- jQuery( '.rtm-uploader-tabs' ).siblings('[data-id="' + class_name + '"]').show();
586
jQuery( this ).addClass( 'active' );
587
}
588
});
580
jQuery( '.rtm-uploader-tabs li' ).click( function( e ){
581
if( ! jQuery( this ).hasClass( 'active' ) ){
582
jQuery( this ).siblings().removeClass( 'active' );
583
+ jQuery( this ).parents( '.rtm-uploader-tabs' ).siblings().hide();
584
class_name = jQuery( this ).attr( 'class' );
585
+ jQuery( this ).parents( '.rtm-uploader-tabs' ).siblings('[data-id="' + class_name + '"]').show();
586
jQuery( this ).addClass( 'active' );
587
}
588
});
app/helper/RTMediaSettings.php CHANGED
@@ -387,8 +387,8 @@ if ( ! class_exists( 'RTMediaSettings' ) ){
387
* @return void
388
*/
389
public function rtmedia_support_intro(){
390
- echo '<p>' . __( 'If your site has some issues due to BuddyPress Media and you want one on one support then you can create a support topic on the <a target="_blank" href="http://rtcamp.com/groups/buddypress-media/forum/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media">rtCamp Support Forum</a>.', 'rtmedia' ) . '</p>';
391
- echo '<p>' . __( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on <a target="_blank" href="https://github.com/rtCamp/buddypress-media/issues/new">GitHub</a>.', 'rtmedia' ) . '</p>';
392
}
393
394
}
387
* @return void
388
*/
389
public function rtmedia_support_intro(){
390
+ echo '<p>' . __( 'If your site has some issues due to BuddyPress Media and you want one on one support then you can create a support topic on the <a target="_blank" href="http://community.rtcamp.com/c/rtmedia?utm_source=dashboard&utm_medium=plugin&utm_campaign=rtmedia">rtCamp Support Forum</a>.', 'rtmedia' ) . '</p>';
391
+ echo '<p>' . __( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on <a target="_blank" href="https://github.com/rtCamp/rtmedia/issues/new">GitHub</a>.', 'rtmedia' ) . '</p>';
392
}
393
394
}
app/helper/RTMediaSupport.php CHANGED
@@ -434,8 +434,8 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
434
435
if ( 'premium_support' == $form ){
436
if ( ! defined( 'RTMEDIA_PRO_VERSION' ) ){
437
- $content = '<p>' . __( 'If your site has some issues due to BuddyPress Media and you want one on one support then you can create a support topic on the <a target="_blank" href="http://rtcamp.com/groups/buddypress-media/forum/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media">rtCamp Support Forum</a>.', 'rtmedia' ) . '</p>';
438
- $content .= '<p>' . __( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on <a target="_blank" href="https://github.com/rtCamp/buddypress-media/issues/new">GitHub</a>.', 'rtmedia' ) . '</p>';
439
440
echo $content;
441
434
435
if ( 'premium_support' == $form ){
436
if ( ! defined( 'RTMEDIA_PRO_VERSION' ) ){
437
+ $content = '<p>' . __( 'If your site has some issues due to BuddyPress Media and you want one on one support then you can create a support topic on the <a target="_blank" href="http://community.rtcamp.com/c/rtmedia?utm_source=dashboard&utm_medium=plugin&utm_campaign=rtmedia">rtCamp Support Forum</a>.', 'rtmedia' ) . '</p>';
438
+ $content .= '<p>' . __( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on <a target="_blank" href="https://github.com/rtCamp/rtmedia/issues/new">GitHub</a>.', 'rtmedia' ) . '</p>';
439
440
echo $content;
441
app/main/RTMedia.php CHANGED
@@ -800,8 +800,19 @@ class RTMedia
800
if (isset($rtmedia_error) && $rtmedia_error === true)
801
return false;
802
if (!$global_album) {
803
- $global_album = $album->add_global(__("Wall Posts", "rtmedia", true));
804
}
805
}
806
807
function default_count() {
800
if (isset($rtmedia_error) && $rtmedia_error === true)
801
return false;
802
if (!$global_album) {
803
+ $global_album = $album->add_global( __( "Wall Posts", "rtmedia" ) );
804
}
805
+
806
+ // fix multisite global album doesn't exist issue.
807
+ if( is_multisite() && ! rtmedia_get_site_option( 'rtmedia_fix_multisite_global_albums', false ) ){
808
+ $model = new RTMediaModel();
809
+ $global_albums = rtmedia_global_albums();
810
+ $album_objects = $model->get_media( array( 'id' => ( $global_albums ) ), false, false );
811
+ if( empty( $album_objects ) ){
812
+ $global_album = $album->add_global( __( "Wall Posts", "rtmedia" ) );
813
+ }
814
+ rtmedia_update_site_option( 'rtmedia_fix_multisite_global_albums', true );
815
+ }
816
}
817
818
function default_count() {
app/main/controllers/template/RTMediaAJAX.php CHANGED
@@ -47,7 +47,26 @@ class RTMediaAJAX {
47
}
48
49
$album = new RTMediaAlbum();
50
- $rtmedia_id = $album->add( $_POST[ 'name' ], get_current_user_id(), true, false, $_POST[ 'context' ], $_POST[ 'context_id' ] );
51
52
$rtMediaNav = new RTMediaNav();
53
@@ -58,7 +77,7 @@ class RTMediaAJAX {
58
}
59
60
if( $rtmedia_id )
61
- echo $rtmedia_id;
62
else
63
echo false;
64
} else {
47
}
48
49
$album = new RTMediaAlbum();
50
+
51
+ // setup context values
52
+ $context = $_POST['context'];
53
+ if( $context == 'profile' ){
54
+ $context_id = get_current_user_id();
55
+ } else {
56
+ $context_id = ( is_int( $_POST['context_id'] ) ? $_POST['context_id'] : 0 );
57
+ }
58
+
59
+ // setup new album data
60
+ $album_data = apply_filters( 'rtmedia_create_album_data', array(
61
+ 'title' => $_POST['name'],
62
+ 'author' => get_current_user_id(),
63
+ 'new' => true,
64
+ 'post_id'=> false,
65
+ 'context' => $context,
66
+ 'context_id' => $context_id,
67
+ ) );
68
+
69
+ $rtmedia_id = $album->add( $album_data['title'], $album_data['author'], $album_data['new'], $album_data['post_id'], $album_data['context'], $album_data['context_id'] );
70
71
$rtMediaNav = new RTMediaNav();
72
77
}
78
79
if( $rtmedia_id )
80
+ echo apply_filters( 'rtmedia_create_album_response', $rtmedia_id );
81
else
82
echo false;
83
} else {
app/main/controllers/template/rt-template-functions.php CHANGED
@@ -609,13 +609,24 @@ function rtmedia_description_input( $editor = true ) {
609
* @global type $rtmedia_media
610
*/
611
function rtmedia_description( $echo = true ) {
612
- global $rtmedia_media;
613
if ( $echo ){
614
- echo get_post_field( "post_content", $rtmedia_media->media_id );
615
} else {
616
- return get_post_field( "post_content", $rtmedia_media->media_id );
617
}
618
- //echo $rtmedia_media->post_content;
619
}
620
621
/**
609
* @global type $rtmedia_media
610
*/
611
function rtmedia_description( $echo = true ) {
612
if ( $echo ){
613
+ echo rtmedia_get_media_description();
614
+ } else {
615
+ return rtmedia_get_media_description();
616
+ }
617
+ }
618
+
619
+ /*
620
+ * return media description
621
+ */
622
+ function rtmedia_get_media_description( $id = false ){
623
+ if( $id ){
624
+ $media_post_id = rtmedia_media_id( $id );
625
} else {
626
+ global $rtmedia_media;
627
+ $media_post_id = $rtmedia_media->media_id;
628
}
629
+ return get_post_field( "post_content", $media_post_id );
630
}
631
632
/**
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.41
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.42
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.41
10
11
Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
12
@@ -128,6 +128,12 @@ 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.41 =
132
* Fix album edit issue
133
@@ -946,8 +952,8 @@ Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_sou
946
947
== Upgrade Notice ==
948
949
- = 3.7.41 =
950
- Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix album edit issue.
951
952
== Sponsors ==
953
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.42
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.42 =
132
+ * Added rtmedia_get_media_description function
133
+ * js fix for uploader tabs
134
+ * Update support link and github link
135
+ * Fix multisite global album does not exist issue
136
+
137
= 3.7.41 =
138
* Fix album edit issue
139
952
953
== Upgrade Notice ==
954
955
+ = 3.7.42 =
956
+ Requires BuddyPress 1.7 or higher, if using BuddyPress. Added rtmedia_get_media_description function, fix multisite global album does not exist issue.
957
958
== Sponsors ==
959