Skip to content

Commit 7b158f0

Browse files
authored
Merge pull request #1281 from rtMediaWP/develop
Version update v4.5.6
2 parents 84fce8b + 6cf403f commit 7b158f0

12 files changed

+185
-169
lines changed

Local

Whitespace-only changes.

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

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

15-
* **Donate Link:** http://rtcamp.com/donate/
16-
1715
Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
1816

1917
## Description ##
@@ -149,6 +147,14 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
149147

150148
## Changelog ##
151149

150+
### 4.5.6 [February 14, 2019] ###
151+
152+
* FIXED
153+
154+
* Threaded comment and comment count issue with BuddyPress Profile and Group Activity feed.
155+
* Duplicate activity feed comment issue.
156+
* Edited Media size reflection issue in BuddyPress activity feed.
157+
152158
### 4.5.5 [January 22, 2019] ###
153159

154160
* FIXED

app/helper/RTMediaAddon.php

-22
Original file line numberDiff line numberDiff line change
@@ -487,28 +487,6 @@ public function plugins_content( $args = '' ) {
487487
'category' => 'photo',
488488
'purchased' => ( defined( 'RTMEDIA_INSTAGRAM_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-instagram/index.php' ) || defined( 'RTMEDIA_PHOTO_FILTERS_URL' ) || file_exists( WP_PLUGIN_DIR . '/rtmedia-photo-filters/index.php' ) ) ? true : false,
489489
),
490-
array(
491-
'title' => esc_html__( 'Kaltura Add-on', 'buddypress-media' ),
492-
'img_src' => $rtcamp_upload_url . 'edd/2015/08/rtMedia-Kaltura-Add-on.png',
493-
'product_link' => 'https://rtmedia.io/products/rtmedia-kaltura-add-on/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
494-
'desc' => '<p>' . esc_html__( 'Add support for more video formats using Kaltura video solution. It works with Kaltura.com, self-hosted Kaltura-CE and Kaltura-on-premise.', 'buddypress-media' ) . '</p>',
495-
'price' => '$499',
496-
'demo_link' => $rtmedia_demo_url . 'bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
497-
'buy_now' => 'https://rtmedia.io/products/rtmedia-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
498-
'category' => 'video',
499-
'purchased' => ( defined( 'RTMEDIA_KALTURA_PATH' ) || file_exists( WP_PLUGIN_DIR . '/bpm-kaltura/index.php' ) ) ? true : false,
500-
),
501-
array(
502-
'title' => esc_html__( 'FFMPEG Add-on', 'buddypress-media' ),
503-
'img_src' => $rtcamp_upload_url . 'edd/2015/08/rtMedia-FFMPEG-Addon.png',
504-
'product_link' => 'https://rtmedia.io/products/buddypress-media-ffmpeg-converter/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
505-
'desc' => '<p>' . esc_html__( 'Add supports for more audio & video formats using open-source media-node. Media node comes with automated setup script for Ubuntu/Debian.', 'buddypress-media' ) . '</p>',
506-
'price' => '$499',
507-
'demo_link' => $rtmedia_demo_url . 'bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
508-
'buy_now' => 'https://rtmedia.io/products/rtmedia-ffmpeg/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
509-
'category' => 'video',
510-
'purchased' => ( defined( 'RTMEDIA_FFMPEG_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-ffmpeg/index.php' ) ) ? true : false,
511-
),
512490
array(
513491
'title' => esc_html__( 'Membership Add-on', 'buddypress-media' ),
514492
'img_src' => $rtcamp_upload_url . 'edd/2015/08/rtMedia-Membership.png',

app/helper/RTMediaSettings.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public function rtmedia_support_intro() {
428428
'<a target="_blank" href="https://rtmedia.io/support/">' . esc_html__( 'rtMedia Support Page', 'buddypress-media' ) . '</a>.' .
429429
'</p>';
430430
echo '<p>' . esc_html__( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on ', 'buddypress-media' ) .
431-
'<a target="_blank" href="https://github.com/rtCamp/rtmedia/issues/new">' . esc_html__( 'GitHub', 'buddypress-media' ) . '</a>.' .
431+
'<a target="_blank" href="https://github.com/rtMediaWP/rtmedia/issues/new">' . esc_html__( 'GitHub', 'buddypress-media' ) . '</a>.' .
432432
'</p>';
433433
}
434434
}

app/helper/RTMediaSupport.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ public function get_form( $form = '' ) {
465465
$content .= '<p>' .
466466
sprintf(
467467
esc_html__( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on %s', 'buddypress-media' ),
468-
'<a target="_blank" href="https://github.com/rtCamp/rtmedia/issues/new">' . esc_html__( 'GitHub', 'buddypress-media' ) . '</a>.'
468+
'<a target="_blank" href="https://github.com/rtMediaWP/rtmedia/issues/new">' . esc_html__( 'GitHub', 'buddypress-media' ) . '</a>.'
469469
) .
470470
'</p>';
471471

app/main/RTMedia.php

+68-9
Original file line numberDiff line numberDiff line change
@@ -332,18 +332,77 @@ function custom_style_for_activity_image_size() {
332332
$media_width = 'auto';
333333
}
334334

335-
?>
336-
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail {
337-
max-width: <?php echo esc_attr( $media_width ); ?>;
338-
max-height: <?php echo esc_attr( $media_height ); ?>;
339-
overflow: hidden;
335+
$video_height = ( isset( $this->options['defaultSizes_video_activityPlayer_height'] ) ? $this->options['defaultSizes_video_activityPlayer_height'] : '240' );
336+
$video_width = ( isset( $this->options['defaultSizes_video_activityPlayer_width'] ) ? $this->options['defaultSizes_video_activityPlayer_width'] : '320' );
337+
338+
if ( '0' === $video_height ) {
339+
$video_height = '240';
340340
}
341341

342-
.rtmedia-comment-media-container .mejs-container.mejs-video,
343-
.rtmedia-activity-container .mejs-container.mejs-video{
344-
min-height: <?php echo esc_attr( $this->options['defaultSizes_video_activityPlayer_height'] ); ?>px;
345-
min-width: <?php echo esc_attr( $this->options['defaultSizes_video_activityPlayer_width'] ); ?>px;
342+
if ( '0' === $video_width ) {
343+
$video_width = '320';
346344
}
345+
346+
$music_width = ( isset( $this->options['defaultSizes_music_activityPlayer_width'] ) ? $this->options['defaultSizes_music_activityPlayer_width'] : '320' );
347+
348+
if ( '0' === $music_width ) {
349+
$music_width = '320';
350+
}
351+
352+
?>
353+
.rtmedia-activity-container ul.rtm-activity-media-list{
354+
overflow: auto;
355+
}
356+
357+
div.rtmedia-activity-container ul.rtm-activity-media-list li.media-type-document,
358+
div.rtmedia-activity-container ul.rtm-activity-media-list li.media-type-other{
359+
margin-left: 0.6em !important;
360+
}
361+
362+
.rtmedia-activity-container li.media-type-video{
363+
height: <?php echo esc_attr( $video_height ); ?>px !important;
364+
width: <?php echo esc_attr( $video_width ); ?>px !important;
365+
}
366+
367+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail,
368+
.rtmedia-activity-container li.media-type-photo a{
369+
width: 100% !important;
370+
height: 98% !important;
371+
}
372+
373+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail video{
374+
width: 100% !important;
375+
height: 100% !important;
376+
}
377+
378+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video,
379+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video video,
380+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video .mejs-overlay-play{
381+
width: 100% !important;
382+
height: 100% !important;
383+
}
384+
385+
.rtmedia-activity-container li.media-type-music{
386+
width: <?php echo esc_attr( $music_width ); ?>px !important;
387+
}
388+
389+
.rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail,
390+
.rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail .mejs-audio,
391+
.rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail audio{
392+
width: 100% !important;
393+
}
394+
395+
.rtmedia-activity-container li.media-type-photo{
396+
width: <?php echo esc_attr( $media_width ); ?> !important;
397+
height: <?php echo esc_attr( $media_height ); ?> !important;
398+
}
399+
400+
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail,
401+
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail img {
402+
width: 100% !important;
403+
height: 100% !important;
404+
overflow: hidden;
405+
}
347406
<?php
348407
global $rtmedia;
349408
if ( rtmedia_check_comment_media_allow() && ! rtmedia_check_comment_in_commented_media_allow() ) { ?>

app/main/controllers/activity/RTMediaBuddyPressActivity.php

+6-19
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function __construct() {
2727
add_action( 'bp_activity_delete_comment', array( $this, 'delete_comment_sync' ), 10, 2 );
2828
add_filter( 'bp_activity_allowed_tags', array( &$this, 'override_allowed_tags' ) );
2929
add_filter( 'bp_get_activity_parent_content', array( &$this, 'bp_get_activity_parent_content' ) );
30-
add_filter( 'bp_activity_type_before_save', array( $this, 'bp_activity_type_before_save' ) );
3130
add_filter( 'bp_activity_content_before_save', array( $this, 'bp_activity_content_before_save' ) );
3231
add_action( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
3332

@@ -252,23 +251,7 @@ function bp_get_activity_parent_content( $content ) {
252251
}
253252

254253
/**
255-
* This function will check for the media file attached to the actitvity and accordingly will set type.
256-
*
257-
* @param string $type Type of the Activity.
258-
*
259-
* @return string Filtered value of the activity type.
260-
*/
261-
public function bp_activity_type_before_save( $type ) {
262-
263-
$rtmedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
264-
if ( ( ! empty( $rtmedia_attached_files ) ) && is_array( $rtmedia_attached_files ) ) {
265-
$type = 'rtmedia_update';
266-
}
267-
return $type;
268-
}
269-
270-
/**
271-
* This function will check for the media file attached to the actitvity and accordingly will set content.
254+
* This function will check for the media file attached to the activity and accordingly will set content.
272255
*
273256
* @param string $content Content of the Activity.
274257
*
@@ -279,7 +262,11 @@ public function bp_activity_content_before_save( $content ) {
279262
$rtmedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
280263
if ( ( ! empty( $rtmedia_attached_files ) ) && is_array( $rtmedia_attached_files ) ) {
281264
$obj_activity = new RTMediaActivity( $rtmedia_attached_files, 0, $content );
282-
$content = $obj_activity->create_activity_html();
265+
266+
// Remove action to fix duplication issue of comment content.
267+
remove_action( 'bp_activity_content_before_save', 'rtmedia_bp_activity_comment_content_callback', 1001, 1 );
268+
269+
$content = $obj_activity->create_activity_html();
283270
}
284271
return $content;
285272
}

app/main/controllers/upload/RTMediaUploadEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function template_redirect( $create_activity = true ) {
109109
$media = $media_obj->model->get( array( 'activity_id' => $current_media_id ) );
110110
}
111111

112-
if ( $media[0]->album_id ) {
112+
if ( ! empty( $media[0] ) && $media[0]->album_id ) {
113113
$album_id = $media[0]->album_id;
114114
$privacy = $media[0]->privacy;
115115
$context = $media[0]->context;

deploy.sh

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
44

55
# main config
6+
export SVNCLONEPATH="$HOME/wp-svn"
67
export PLUGINSLUG="buddypress-media" #must match with wordpress.org plugin slug
78
export MAINFILE="index.php" # this should be the name of your main php file in the wordpress plugin
89
#SVNUSER="rtcamp" # your svn username

index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
44
Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
55
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!
6-
Version: 4.5.5
6+
Version: 4.5.6
77
Author: rtCamp
88
Text Domain: buddypress-media
99
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
@@ -22,7 +22,7 @@
2222
* The version of the plugin
2323
*
2424
*/
25-
define( 'RTMEDIA_VERSION', '4.5.5' );
25+
define( 'RTMEDIA_VERSION', '4.5.6' );
2626
}
2727

2828
if ( ! defined( 'RTMEDIA_PATH' ) ) {

0 commit comments

Comments
 (0)