Skip to content

Commit 233efc8

Browse files
authored
Merge pull request #1418 from rtMediaWP/develop
Version update v4.5.8
2 parents 75a0ec3 + 7aa0168 commit 233efc8

22 files changed

+719
-775
lines changed

README.md

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
[![Browserstacklogo](https://cloud.githubusercontent.com/assets/8191145/26444146/c166a1b8-4158-11e7-8d8e-78e5f862bbaa.png)](https://browserstack.com)
1+
# rtMedia for WordPress, BuddyPress and bbPress #
22

3-
![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=MU1JamdmRnppK0hhQy9QMU8wdDJ2MUEyb1ZuS0ljVFQvSHZ6anFvNzUxTT0tLXhUNnliTnZGcE5CcW93N0I1eXdnM3c9PQ==--8c124e667dd0c317618efde1bed2b260000916b6)
3+
Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
4+
5+
<a href="https://rtcamp.com/?utm_source=github&utm_medium=readme" rel="nofollow"><img src="https://rtcamp.com/wp-content/uploads/2019/04/[email protected]" alt="Handcrafted Enterprise WordPress Solutions by rtCamp" /></a>
46

57
![banner-772x250](https://cloud.githubusercontent.com/assets/8191145/26444356/bb47f150-4159-11e7-997e-b960bca0293d.jpg)
68

7-
# rtMedia for WordPress, BuddyPress and bbPress #
9+
[![Browserstacklogo](https://cloud.githubusercontent.com/assets/8191145/26444146/c166a1b8-4158-11e7-8d8e-78e5f862bbaa.png)](https://browserstack.com)
10+
11+
![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=MU1JamdmRnppK0hhQy9QMU8wdDJ2MUEyb1ZuS0ljVFQvSHZ6anFvNzUxTT0tLXhUNnliTnZGcE5CcW93N0I1eXdnM3c9PQ==--8c124e667dd0c317618efde1bed2b260000916b6)
812

913

1014
* **Contributors:** [rtcamp](http://profiles.wordpress.org/rtcamp), [mangeshp](http://profiles.wordpress.org/mangeshp), [sanket.parmar](http://profiles.wordpress.org/sanket.parmar), [pranalipatel](http://profiles.wordpress.org/pranalipatel), [jignesh.nakrani](http://profiles.wordpress.org/jignesh.nakrani), [manishsongirkar36](http://profiles.wordpress.org/manishsongirkar36), [kiranpotphode](http://profiles.wordpress.org/kiranpotphode), [yahil](http://profiles.wordpress.org/yahil), [1naveengiri](http://profiles.wordpress.org/1naveengiri), [bhargavbhandari90](http://profiles.wordpress.org/bhargavbhandari90), [deepak1191](http://profiles.wordpress.org/deepak1191), [rittesh.patel](http://profiles.wordpress.org/rittesh.patel), [sagarjadhav](http://profiles.wordpress.org/sagarjadhav), [pushpak.pop](http://profiles.wordpress.org/pushpak.pop), [faishal](http://profiles.wordpress.org/faishal), [desaiuditd](http://profiles.wordpress.org/desaiuditd), [rahul286](http://profiles.wordpress.org/rahul286), [JoshuaAbenazer](http://profiles.wordpress.org/JoshuaAbenazer), [gagan0123](http://profiles.wordpress.org/gagan0123), [saurabhshukla](http://profiles.wordpress.org/saurabhshukla), [nitun.lanjewar](http://profiles.wordpress.org/nitun.lanjewar), [umesh.nevase](http://profiles.wordpress.org/umesh.nevase), [suhasgirgaonkar](http://profiles.wordpress.org/suhasgirgaonkar), [neerukoul](http://profiles.wordpress.org/neerukoul), [hrishiv90](http://profiles.wordpress.org/hrishiv90), [kanakiyajay](http://profiles.wordpress.org/kanakiyajay), [jarretc](http://profiles.wordpress.org/jarretc), [tobiaskluge](http://profiles.wordpress.org/tobiaskluge), [rafaelfunchal](http://profiles.wordpress.org/rafaelfunchal), [UmeshSingla](http://profiles.wordpress.org/UmeshSingla), [mehulkaklotar](http://profiles.wordpress.org/mehulkaklotar), [tannermirabel](http://profiles.wordpress.org/tannermirabel), [kishores](http://profiles.wordpress.org/kishores), [chandrapatel](http://profiles.wordpress.org/chandrapatel), [rahul3883](http://profiles.wordpress.org/rahul3883/), [nomnom99](http://profiles.wordpress.org/nomnom99), [sayanchakraborty](https://profiles.wordpress.org/sayanchakraborty), [milindmore22](https://profiles.wordpress.org/milindmore22), [thrijith](https://profiles.wordpress.org/thrijith), [abhijitrakas](https://profiles.wordpress.org/abhijitrakas), [sid177](https://profiles.wordpress.org/sid177), [montu3366](https://profiles.wordpress.org/montu3366), [jashwini](https://profiles.wordpress.org/jashwini), [juhise](https://profiles.wordpress.org/juhise), [ravatparmar](https://profiles.wordpress.org/ravatparmar), [dharmin16](https://profiles.wordpress.org/dharmin16), [malavvasita](https://profiles.wordpress.org/malavvasita), [pooja1210](https://profiles.wordpress.org/pooja1210), [krupajnanda](https://profiles.wordpress.org/krupajnanda), [kanumalivad](https://profiles.wordpress.org/kanumalivad), [surajkumarsingh](https://profiles.wordpress.org/surajkumarsingh)
1115

1216

1317
* **License:** [GPL v2 or later]( http://www.gnu.org/licenses/gpl-2.0.html)
1418

15-
Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
16-
1719
## Description ##
1820

1921
rtMedia is the **only** complete media solution for WordPress, BuddyPress and bbPress, and is **WordPress.com VIP** compatible.
@@ -145,6 +147,16 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
145147

146148
## Changelog ##
147149

150+
### 4.5.8 [July 31, 2019] ###
151+
152+
* FIXED
153+
* Duplicate media creation when posted from lightbox and activity creation for media comments kept off from settings
154+
* Upload terms and direct upload compatibility while commenting from activity
155+
* Overlapped media file name in BuddyPress Legacy template
156+
* Issue with uploader container which gets hidden after media upload on activity page
157+
* Fix default theme css enqueue for BuddyPress templates.
158+
* Minor UI bug Fixes
159+
148160
### 4.5.7 [June 12, 2019] ###
149161

150162
* NEW

app/assets/admin/css/admin.css

+6
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@
250250
.rtm-option-wrapper .form-table .rtm-form-radio label {
251251
margin-top: 5px !important;
252252
}
253+
.rtm-option-wrapper .form-table .wp-picker-input-wrap label {
254+
display: inline;
255+
}
256+
.rtm-option-wrapper .form-table .wp-picker-clear {
257+
margin-left: 5px;
258+
}
253259
.rtm-option-wrapper textarea,
254260
.rtm-option-wrapper select,
255261
.rtm-option-wrapper input[type=text],

app/assets/admin/css/admin.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/admin/css/sass/_components.scss

+12
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,20 @@
8282
margin-top: 5px !important;
8383
}
8484
}
85+
86+
.wp-picker-input-wrap {
87+
label {
88+
display: inline;
89+
}
90+
}
91+
92+
.wp-picker-clear {
93+
margin-left : 5px;
94+
}
95+
8596
}
8697

98+
8799
textarea,
88100
select,
89101
input[type=text],

app/assets/css/rtmedia.css

+33
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ body.media.buddypress {
152152
margin-left: 50px;
153153
padding-left: 15px;
154154
}
155+
#buddypress ul.activity-list li.activity-item .activity-comments .rtmedia-uploader-div .rtm-plupload-list .plupload_queue_li {
156+
padding: 5px;
157+
}
158+
#buddypress ul.activity-list li.activity-item .activity-comments .rtmedia-uploader-div .rtm-plupload-list .rtm-upload-edit-desc {
159+
background: #fff;
160+
border: solid 1px #ccc;
161+
}
155162

156163
#buddypress form#whats-new-form #whats-new-content.active #whats-new-options[style] #whats-new-post-in-box {
157164
margin-top: 0;
@@ -260,6 +267,7 @@ form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-desc-wrapper input.r
260267
#rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title {
261268
min-width: 100%;
262269
margin-top: 1px;
270+
display: block;
263271
}
264272

265273
.rtm-plupload-list:empty {
@@ -1185,6 +1193,11 @@ img.mfp-img {
11851193
min-height: 200px;
11861194
min-width: 200px;
11871195
}
1196+
.mfp-content .rtm-lightbox-container .rtm-plupload-list .rtm-upload-edit-desc {
1197+
background: #fff;
1198+
min-height: 70px;
1199+
width: 100px;
1200+
}
11881201
.mfp-content .rtm-single-meta {
11891202
background: #FFFFFF;
11901203
overflow: hidden;
@@ -1715,6 +1728,12 @@ img.mfp-img {
17151728
border-bottom: 0;
17161729
padding-bottom: 0;
17171730
}
1731+
#buddypress .activity #activity-stream li.plupload_queue_li {
1732+
padding: 5px;
1733+
}
1734+
#buddypress .activity #activity-stream li.plupload_queue_li .plupload_file_name .rtm-upload-edit-desc-wrapper textarea {
1735+
width: 100px;
1736+
}
17181737

17191738
.rtmedia-activity-container .rtmedia-item-actions {
17201739
display: none;
@@ -1858,6 +1877,20 @@ a.rtmedia-comment-link.rtmedia-comments-link {
18581877
display: initial;
18591878
}
18601879

1880+
.mejs-poster.mejs-layer {
1881+
height: 0 !important;
1882+
}
1883+
1884+
.bp-legacy #buddypress #activity-stream .rtmedia-item-title {
1885+
margin: 0px;
1886+
}
1887+
.bp-legacy #buddypress #activity-stream .rtmedia-item-title p {
1888+
margin: 0px;
1889+
}
1890+
.bp-legacy #buddypress #activity-stream .media-type-video .rtmedia-item-title {
1891+
margin: -20px;
1892+
}
1893+
18611894
.rtmedia-album-edit .rtm-checkbox-wrap {
18621895
background: rgba(255, 255, 255, 0.9);
18631896
height: 30px;

app/assets/css/rtmedia.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/css/sass/_activity.scss

+50-4
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,33 @@
7373

7474
}
7575

76-
// remove border and padding
77-
#buddypress ul.rtmedia-list li {
78-
border-bottom: 0;
79-
padding-bottom: 0;
76+
#buddypress {
77+
// Remove border and padding.
78+
ul.rtmedia-list {
79+
li {
80+
border-bottom: 0;
81+
padding-bottom: 0;
82+
}
83+
}
84+
85+
// Fix UI for media pl-upload preview.
86+
.activity {
87+
#activity-stream {
88+
li.plupload_queue_li {
89+
padding: 5px;
90+
.plupload_file_name {
91+
.rtm-upload-edit-desc-wrapper{
92+
textarea {
93+
width: 100px;
94+
}
95+
}
96+
}
97+
}
98+
}
99+
}
80100
}
81101

102+
82103
// hide unnecessory div
83104
.rtmedia-activity-container {
84105
.rtmedia-item-actions {
@@ -252,3 +273,28 @@ a.rtmedia-comment-link{
252273
a.rtmedia-comment-link.rtmedia-comments-link{
253274
display: initial;
254275
}
276+
277+
// MediaElement.js poster size fix.
278+
.mejs-poster.mejs-layer {
279+
height: 0!important;
280+
}
281+
282+
// Media title fix on legacy.
283+
.bp-legacy {
284+
#buddypress {
285+
#activity-stream {
286+
.rtmedia-item-title{
287+
margin: 0px;
288+
p {
289+
margin : 0px;
290+
}
291+
}
292+
293+
.media-type-video {
294+
.rtmedia-item-title{
295+
margin: -20px;
296+
}
297+
}
298+
}
299+
}
300+
}

app/assets/css/sass/_buddypress.scss

+10
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ body.media.buddypress {
7474
color: #767676;
7575
margin-left: 50px;
7676
padding-left: 15px;
77+
78+
.rtm-plupload-list {
79+
.plupload_queue_li {
80+
padding: 5px;
81+
}
82+
.rtm-upload-edit-desc {
83+
background: #fff;
84+
border : solid 1px #ccc;
85+
}
86+
}
7787
}
7888
}
7989
}

app/assets/css/sass/_popup.scss

+8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
min-width: 200px;
3131
}
3232
}
33+
34+
.rtm-plupload-list {
35+
.rtm-upload-edit-desc {
36+
background: #fff;
37+
min-height: 70px;
38+
width: 100px;
39+
}
40+
}
3341
}
3442

3543
.rtm-single-meta {

app/assets/css/sass/_rtm.scss

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ form .rtmedia-container .rtm-plupload-list,
111111
input.rtm-upload-edit-title {
112112
min-width: 100%;
113113
margin-top: 1px;
114+
display: block;
114115
}
115116
}
116117
}

app/assets/js/rtMedia.backbone.js

+23-9
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,9 @@ jQuery( document ).ready( function( $ ) {
11541154
objUploadView.uploader.bind( 'FilesAdded', function( upl, rfiles ) {
11551155
//$("#aw-whats-new-submit").attr('disabled', 'disabled');
11561156

1157+
//Remove focusout when media is added in activity post.
1158+
jQuery( '#whats-new-form' ).unbind( 'focusout' );
1159+
11571160
$.each( rfiles, function( i, file ) {
11581161

11591162
//Set file title along with file
@@ -1931,7 +1934,13 @@ function rtmedia_selected_file_list( plupload, file, uploader, error, comment_me
19311934
rtmedia_plupload_file += '</li>';
19321935

19331936
jQuery( rtmedia_plupload_file ).appendTo( rtmedia_uploader_filelist );
1934-
jQuery( '#whats-new' ).focus();
1937+
1938+
if ( comment_media_id ) {
1939+
jQuery( '#rtmedia-comment-media-upload-' + comment_media_id ).focus();
1940+
} else {
1941+
jQuery( '#whats-new' ).focus();
1942+
}
1943+
19351944
var type = file.type;
19361945
var media_title = file.name;
19371946
var ext = media_title.substring( media_title.lastIndexOf( '.' ) + 1, media_title.length );
@@ -1963,7 +1972,17 @@ function rtmedia_selected_file_list( plupload, file, uploader, error, comment_me
19631972
} else {
19641973
jQuery.each( rtmedia_exteansions, function( key, value ) {
19651974
if ( value.indexOf( ext ) >= 0 ) {
1966-
jQuery( '<img src="' + rtmedia_media_thumbs[ key ] + '" />' ).appendTo( '#file_thumb_' + file.id );
1975+
1976+
var media_thumbnail = '';
1977+
1978+
// Below condition is to show docs and files addon thumbnail.
1979+
if ( rtmedia_media_thumbs[ ext ] ) {
1980+
media_thumbnail = rtmedia_media_thumbs[ ext ];
1981+
} else {
1982+
media_thumbnail = rtmedia_media_thumbs[ key ];
1983+
}
1984+
1985+
jQuery( '<img />', { src: media_thumbnail } ).appendTo( '#file_thumb_' + file.id );
19671986

19681987
return false;
19691988
}
@@ -2449,7 +2468,6 @@ function renderUploadercomment_media( widget_id, parent_id_type ) {
24492468
while (upl.files.length > 1) {
24502469
upl.removeFile(upl.files[0]);
24512470
}
2452-
24532471
/* remove the last file that has being added to the comment media */
24542472
commentObj[ widget_id ].upload_remove_array = [ ];
24552473
jQuery( '#rtmedia_uploader_filelist-'+widget_id+' li.plupload_queue_li' ).remove();
@@ -2592,11 +2610,8 @@ function renderUploadercomment_media( widget_id, parent_id_type ) {
25922610
rtMediaHook.call( 'rtmedia_js_after_files_added', [ upl, rfiles ] );
25932611

25942612
if ( 'undefined' != typeof rtmedia_direct_upload_enabled && '1' == rtmedia_direct_upload_enabled ) {
2595-
var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
2596-
if ( false == allow_upload ) {
2597-
return false;
2598-
}
25992613

2614+
$( '.rtmedia-comment-media-submit-' + widget_id ).focus();
26002615
/* when direct upload is enable */
26012616
jQuery( '.'+rtmedia_comment_media_submit+widget_id ).trigger( 'click' );
26022617
}
@@ -2655,7 +2670,7 @@ function renderUploadercomment_media( widget_id, parent_id_type ) {
26552670

26562671
ext = tmp_array[tmp_array.length - 1];
26572672
if ( ! ( typeof ( up.settings.upload_size ) != 'undefined' && typeof ( up.settings.upload_size[ext] ) != 'undefined' && ( up.settings.upload_size[ext]['size'] < 1 || ( up.settings.upload_size[ext]['size'] * 1024 * 1024 ) >= err.file.size ) ) ) {
2658-
rtmedia_selected_file_list( plupload, err.file, up, err );
2673+
rtmedia_selected_file_list( plupload, err.file, up, err, widget_id );
26592674
}
26602675
}
26612676
} else {
@@ -2665,7 +2680,6 @@ function renderUploadercomment_media( widget_id, parent_id_type ) {
26652680

26662681
rtmedia_selected_file_list( plupload, err.file, '', err, widget_id );
26672682
}
2668-
26692683
jQuery( '.plupload_delete-'+widget_id ).on( 'click', function( e ) {
26702684
e.preventDefault();
26712685

app/main/RTMedia.php

+15-2
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,14 @@ function enqueue_scripts_styles() {
11531153
foreach ( $this->allowed_types as $key_type => $value_type ) {
11541154
$rtmedia_media_thumbs[ $key_type ] = $value_type['thumbnail'];
11551155
}
1156+
1157+
/**
1158+
* Filter to add docs and files thumbnails.
1159+
*
1160+
* This filter is used by only rtmedia-docs-files addon.
1161+
* */
1162+
$rtmedia_media_thumbs = apply_filters( 'rtmedia_add_docs_thumbs', $rtmedia_media_thumbs );
1163+
11561164
wp_localize_script( 'rtmedia-backbone', 'rtmedia_media_thumbs', $rtmedia_media_thumbs );
11571165
wp_localize_script( 'rtmedia-backbone', 'rtmedia_set_featured_image_msg', esc_html__( 'Featured media set successfully.', 'buddypress-media' ) );
11581166
wp_localize_script( 'rtmedia-backbone', 'rtmedia_unset_featured_image_msg', esc_html__( 'Featured media removed successfully.', 'buddypress-media' ) );
@@ -1335,8 +1343,13 @@ function enqueue_scripts_styles() {
13351343
$rtmedia_router = new RTMediaRouter();
13361344
if ( ! empty( $rtmedia_router->query_vars ) ) {
13371345
$wp_current_stylesheet = get_stylesheet();
1338-
wp_enqueue_style( 'bp-neavuaue-stylesheet-theme', BP_PLUGIN_URL . 'bp-templates/bp-legacy/css/'. $wp_current_stylesheet . ".min.css" );
1339-
wp_enqueue_style( 'bp-neavuaue-stylesheet-buddypress', BP_PLUGIN_URL . 'bp-templates/bp-legacy/css/buddypress.min.css', '' );
1346+
1347+
// If file is already exists in buddypress then enqueue it.
1348+
if ( file_exists( sprintf( '%sbp-templates/bp-legacy/css/%s.min.css', BP_PLUGIN_DIR, $wp_current_stylesheet ) ) ) {
1349+
wp_enqueue_style( 'bp-nouveau-stylesheet-theme', BP_PLUGIN_URL . 'bp-templates/bp-legacy/css/' . $wp_current_stylesheet . '.min.css' );
1350+
}
1351+
1352+
wp_enqueue_style( 'bp-nouveau-stylesheet-buddypress', BP_PLUGIN_URL . 'bp-templates/bp-legacy/css/buddypress.min.css', '' );
13401353
}
13411354
}
13421355
}

0 commit comments

Comments
 (0)