Skip to content

Commit

Permalink
Merge pull request #1441 from rtMediaWP/develop
Browse files Browse the repository at this point in the history
4.5.9 Release Version [ develop to master ]
  • Loading branch information
dharmin authored Oct 24, 2019
2 parents e6f5b86 + f5f52e0 commit 98e672d
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 18 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & mor
![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=MU1JamdmRnppK0hhQy9QMU8wdDJ2MUEyb1ZuS0ljVFQvSHZ6anFvNzUxTT0tLXhUNnliTnZGcE5CcW93N0I1eXdnM3c9PQ==--8c124e667dd0c317618efde1bed2b260000916b6)


* **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)
* **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), [dishitpala](https://profiles.wordpress.org/dishitpala)


* **License:** [GPL v2 or later]( http://www.gnu.org/licenses/gpl-2.0.html)
Expand Down Expand Up @@ -147,6 +147,15 @@ https://www.youtube.com/watch?v=dJrykKQGDcs

## Changelog ##

### 4.5.9 [October 24, 2019] ###

* Enhancement
* Add new class on activity page based on the uploaded media type

* FIXED
* Post Update button issue with BuddyPress Nouveau template
* Issue when user uploads the media with link in comment on buddypress activity

### 4.5.8 [August 6, 2019] ###

* FIXED
Expand Down
4 changes: 2 additions & 2 deletions app/assets/css/rtmedia.css
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ button::-moz-focus-inner {
padding: 0;
width: 90px;
height: 110px;
-webkit-tap-highlight-color: transparent;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
opacity: 0;
z-index: 10;
-webkit-transition: all 300ms ease-out;
Expand Down Expand Up @@ -2969,7 +2969,7 @@ a.rtmedia-upload-media-link {
#buddypress .mejs-controls button {
padding: 4px 8px;
border: none;
background: transparent url("../../../lib/media-element/mejs-controls.png") no-repeat;
background: rgba(0, 0, 0, 0) url("../../../lib/media-element/mejs-controls.png") no-repeat;
}
#buddypress .mejs-controls .mejs-play > button {
background-position: 0 0;
Expand Down
9 changes: 9 additions & 0 deletions app/assets/js/rtMedia.backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,9 +1005,18 @@ jQuery( document ).ready( function( $ ) {

var rt_uploader_div = whats_new_form.find( '.rtmedia-uploader-div' );
var rt_uploader_filelist = whats_new_form.find( '#rtmedia_uploader_filelist' );
var whats_new_option = whats_new_form.find( '#whats-new-options' );

rt_uploader_div.show();

if ( 0 !== whats_new_option.length ) {
whats_new_option.show();

whats_new_option.css( {
'opacity': '1'
} );
}

rt_uploader_div.addClass( 'clearfix' );

whats_new_form.find( '#rtmedia-action-update' ).removeClass( 'clearfix' );
Expand Down
30 changes: 26 additions & 4 deletions app/main/controllers/activity/RTMediaActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,25 @@ public function create_activity_html( $type = 'activity' ) {
}
$rtmedia_activity_ul_class = apply_filters( 'rtmedia_' . $type . '_ul_class', 'rtm-activity-media-list' );

$uploaded_media_types = [];
$rtmedia_activity_ul_list_class = 'rtm-activity-mixed-list';

// Loop through each media and check media type.
$uploaded_media_types = array_map( function ( $current_media ) {
return is_object( $current_media ) ? $current_media->media_type : '';
}, $media_details );

// Remove empty values from media type list.
$media_type_list = array_filter( $uploaded_media_types, 'strlen' );

// Update activity class based on media type.
if ( ! empty( $media_type_list ) ) {
if ( count( array_unique( $uploaded_media_types ) ) === 1 ) {
$current_media_type = end( $uploaded_media_types );
$rtmedia_activity_ul_list_class = "rtm-activity-{$current_media_type}-list";
}
}

$media_content = '';
$count = 0;
foreach ( $media_details as $media ) {
Expand Down Expand Up @@ -144,10 +163,11 @@ public function create_activity_html( $type = 'activity' ) {
}

$media_container_start = sprintf(
'<ul class="%s %s rtmedia-activity-media-length-%s">',
'<ul class="%s %s rtmedia-activity-media-length-%s %s">',
esc_attr( $media_container_start_class ),
esc_attr( $rtmedia_activity_ul_class ),
esc_attr( $count )
esc_attr( $count ),
esc_attr( $rtmedia_activity_ul_list_class )
);

$media_container_end = '</ul>';
Expand All @@ -169,15 +189,17 @@ public function create_activity_html( $type = 'activity' ) {
$activity .= $activity_content;
$activity .= $activity_container_end;

$current_max_links = absint( get_option( 'comment_max_links' ) ); // get current number of allowed links.

// Bypass comment links limit.
add_filter(
'option_comment_max_links',
function ( $values ) {
function ( $values ) use ( $current_max_links ) {
$rtmedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
// Check if files available.
if ( is_array( $rtmedia_attached_files ) && ! empty( $rtmedia_attached_files[0] ) ) {
// One url of image and other for anchor tag.
$values = count( $rtmedia_attached_files ) * 3;
$values = ( count( $rtmedia_attached_files ) * 3 ) + $current_max_links;
}
return $values;
}
Expand Down
5 changes: 3 additions & 2 deletions bin/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ before_script:
- sudo apt-get autoclean
- sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = [email protected]" > /home/travis/.gitconfig'
- wget -qO ee rt.cx/ee && sudo bash ee
- sudo ee stack install
- sudo ee stack install --nginx
- sudo ee stack install --web
- sudo wp --yes --allow-root cli update --nightly
- sudo ee site create automation.rtmedia.me --wp --user=ADMINUSER [email protected] --pass=ADMINPASS
- sudo sed -i '/^127.0.0.1/ s/$/ automation.rtmedia.me/' /etc/hosts
Expand All @@ -42,7 +43,7 @@ before_script:
- cd $PLUGIN_DIR
- cp -Rf * /var/www/automation.rtmedia.me/htdocs/wp-content/plugins/rtMedia/
- cd /var/www/automation.rtmedia.me/htdocs/
- wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.4.4.0.zip
- wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.5.0.0.zip
- wp plugin activate --all
- cd $PLUGIN_DIR
- cd tests/codeception/tests/_data
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
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!
Version: 4.5.8
Version: 4.5.9
Author: rtCamp
Text Domain: buddypress-media
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
Expand All @@ -22,7 +22,7 @@
* The version of the plugin
*
*/
define( 'RTMEDIA_VERSION', '4.5.8' );
define( 'RTMEDIA_VERSION', '4.5.9' );
}

if ( ! defined( 'RTMEDIA_PATH' ) ) {
Expand Down
4 changes: 2 additions & 2 deletions languages/buddypress-media.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
msgid ""
msgstr ""
"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.5.8\n"
"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.5.9\n"
"Report-Msgid-Bugs-To: https://rtmedia.io/support/\n"
"POT-Creation-Date: 2019-08-06 10:41:32+00:00\n"
"POT-Creation-Date: 2019-10-24 07:25:06+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
21 changes: 16 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== rtMedia for WordPress, BuddyPress and bbPress ===
Contributors: rtcamp, mangeshp, sanket.parmar, pranalipatel, jignesh.nakrani, manishsongirkar36, kiranpotphode, yahil, 1naveengiri, bhargavbhandari90, raftaar1191, rittesh.patel, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores, chandrapatel, rahul3883, nomnom99, sayanchakraborty, milindmore22, thrijith, abhijitrakas, sid177, montu3366, jashwini, juhise, ravatparmar, dharmin16, malavvasita, pooja1210, krupajnanda, surajkumarsingh, kanumalivad
Contributors: rtcamp, mangeshp, sanket.parmar, pranalipatel, jignesh.nakrani, manishsongirkar36, kiranpotphode, yahil, 1naveengiri, bhargavbhandari90, raftaar1191, rittesh.patel, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores, chandrapatel, rahul3883, nomnom99, sayanchakraborty, milindmore22, thrijith, abhijitrakas, sid177, montu3366, jashwini, juhise, ravatparmar, dharmin16, malavvasita, pooja1210, krupajnanda, surajkumarsingh, kanumalivad, dishitpala
Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, media-node, rtMedia, WordPress, bbPress, masonry
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Requires at least: WordPress 4.1
Tested up to: 5.2.2
Stable tag: 4.5.8
Tested up to: 5.3
Stable tag: 4.5.9

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

Expand Down Expand Up @@ -134,6 +134,17 @@ http://www.youtube.com/watch?v=dJrykKQGDcs

== Changelog ==

= 4.5.9 [October 24, 2019] =

* Enhancement

* Add new class on activity page based on the uploaded media type

* FIXED

* Post Update button issue with BuddyPress Nouveau template
* Issue when user uploads the media with link in comment on buddypress activity

= 4.5.8 [August 6, 2019] =

* FIXED
Expand Down Expand Up @@ -1614,8 +1625,8 @@ http://www.youtube.com/watch?v=dJrykKQGDcs

== Upgrade Notice ==

= 4.5.8 =
rtMedia 4.5.8, with fixes for, media duplication when posted from the lightbox, upload terms and direct media upload compability on activity comment and media caption overlapping issue on Legacy template with some UI fixes.
= 4.5.9 =
rtMedia 4.5.9, with an addition of new classes in BuddPress Activity based on the uploaded media type, and other minor fixes around BuddPress Activity.

== Sponsors ==

Expand Down

0 comments on commit 98e672d

Please sign in to comment.