diff --git a/README.md b/README.md index 8c45c0ae1..bfba49781 100755 --- a/README.md +++ b/README.md @@ -147,6 +147,21 @@ https://www.youtube.com/watch?v=dJrykKQGDcs ## Changelog ## +### 4.6.4 [July 16, 2020] ### + +* Enhancement + * Support for Amazon S3 presigned URLs + * Add attachment_ids in `rtmedia_after_add_media` action hook + +* FIXED + + * Console errors on media editing + * Extension getting changed when renaming media before upload + * Activities not in sync with other subsites in a multisite network, when each subsite has a separate BuddyPress activity feed + * PHP Notices and Warnings + * Comment nesting issue with media activities + * Wrong timestamp while adding comments + ### 4.6.3 [April 30, 2020] ### * FIXED diff --git a/app/assets/js/rtMedia.backbone.js b/app/assets/js/rtMedia.backbone.js index aa21dcbf3..6fb356e39 100755 --- a/app/assets/js/rtMedia.backbone.js +++ b/app/assets/js/rtMedia.backbone.js @@ -28,6 +28,24 @@ jQuery( function( $ ) { media_children.remove(); } }); + + /** + * Remove imageEdit.save function call and add it only when image is being modified in WP editor. + */ + $( '#rtmedia_media_single_edit .rtm-button-save' ).on( 'click', function() { + var $media_id = $( '#rtmedia-editor-media-id' ).val(); + var $nonce = $( '#rtmedia-editor-nonce' ).val(); + if ( 'undefined' === typeof $nonce || '' === $nonce.trim() || 'undefined' === typeof $media_id || '' === $media_id.trim() ) { + return; + } + $media_id = parseInt( $media_id ); + $media_head = $( '#media-head-' + $media_id ); + if ( ! $media_head.length || 'undefined' === typeof $media_head.css( 'display' ) || 'none' !== $media_head.css( 'display' ).trim() ) { + return; + } + + imageEdit.save( $media_id, $nonce ); + } ); }); /** * End of issue 1059 fix @@ -717,10 +735,11 @@ jQuery( function( $ ) { var file_desc_val = jQuery( rtm_file_desc_input ).val(); var file_name_wrapper_el = jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ); - if ( file_title_val != '' ) { - file_name_wrapper_el.text( file_title_val + '.' + rtm_file_name_array[ 1 ] ); - file.title = file_title_val; - } + if ( '' !== file_title_val.trim() ) { + var extension = file.name.split( '.' )[1]; + file_name_wrapper_el.text( file_title_val + '.' + extension ); + file.title = file_title_val; + } if ( file_desc_val != '' ) { file.description = file_desc_val; @@ -1285,8 +1304,9 @@ jQuery( document ).ready( function( $ ) { var file_name_wrapper_el = jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ); - if ( file_title_val != '' ) { - file_name_wrapper_el.text( file_title_val + '.' + rtm_file_name_array[ 1 ] ); + if ( '' !== file_title_val.trim() ) { + var extension = file.name.split( '.' )[1]; + file_name_wrapper_el.text( file_title_val + '.' + extension ); file.title = file_title_val; } @@ -2631,8 +2651,9 @@ function renderUploadercomment_media( widget_id, parent_id_type ) { var file_name_wrapper_el = jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ); - if ( file_title_val != '' ) { - file_name_wrapper_el.text( file_title_val + '.' + rtm_file_name_array[ 1 ] ); + if ( '' !== file_title_val.trim() ) { + var extension = file.name.split( '.' )[1]; + file_name_wrapper_el.text( file_title_val + '.' + extension ); file.title = file_title_val; } diff --git a/app/helper/RTMediaActivityModel.php b/app/helper/RTMediaActivityModel.php index 474413716..3898e4ed2 100644 --- a/app/helper/RTMediaActivityModel.php +++ b/app/helper/RTMediaActivityModel.php @@ -40,6 +40,24 @@ public function get( $columns, $offset = false, $per_page = false, $order_by = ' return parent::get( $columns, $offset, $per_page, $order_by ); } + /** + * Get activity without setting blog_id. + * This function is needed because there's no way to get activity of a different blog. + * Existing get method sets blog_id to current blog. + * + * @since v4.6.4 + * + * @param array $columns Columns. + * @param bool|int $offset Offset. + * @param bool|int $per_page Per page. + * @param string $order_by Order by. + * + * @return array Returned data. + */ + public function get_without_blog_id( $columns, $offset = false, $per_page = false, $order_by = 'activity_id DESC' ) { + return parent::get( $columns, $offset, $per_page, $order_by ); + } + /** * Insert row. * diff --git a/app/main/controllers/activity/RTMediaBuddyPressActivity.php b/app/main/controllers/activity/RTMediaBuddyPressActivity.php index 6ce85f287..12df66a86 100755 --- a/app/main/controllers/activity/RTMediaBuddyPressActivity.php +++ b/app/main/controllers/activity/RTMediaBuddyPressActivity.php @@ -35,7 +35,6 @@ public function __construct() { add_filter( 'bp_activity_truncate_entry', array( $this, 'bp_activity_truncate_entry' ), 10, 3 ); } } - add_action( 'bp_init', array( $this, 'non_threaded_comments' ) ); add_action( 'bp_activity_comment_posted', array( $this, 'comment_sync' ), 10, 2 ); add_action( 'bp_activity_delete_comment', array( $this, 'delete_comment_sync' ), 10, 2 ); add_filter( 'bp_activity_allowed_tags', array( &$this, 'override_allowed_tags' ) ); @@ -557,22 +556,6 @@ public function comment_sync( $comment_id, $param ) { } } - /** - * Save Non-threaded comments. - */ - public function non_threaded_comments() { - $action = sanitize_text_field( filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING ) ); - if ( 'new_activity_comment' === $action ) { - $activity_id = filter_input( INPUT_POST, 'form_id', FILTER_SANITIZE_NUMBER_INT ); - $disable_media = filter_input( INPUT_POST, 'rtmedia_disable_media_in_commented_media', FILTER_SANITIZE_STRING ); - $act = new BP_Activity_Activity( $activity_id ); - - if ( 'rtmedia_update' === $act->type && ! empty( $disable_media ) ) { - $_POST['comment_id'] = $activity_id; - } - } - } - /** * Groups posted update. * diff --git a/app/main/controllers/media/RTMediaMedia.php b/app/main/controllers/media/RTMediaMedia.php index 62dd4df8d..5625e9893 100755 --- a/app/main/controllers/media/RTMediaMedia.php +++ b/app/main/controllers/media/RTMediaMedia.php @@ -206,9 +206,20 @@ public function add( $uploaded, $file_object ) { $rtmedia_points_media_id = $media_ids[0]; } + /** + * Action after a specific type of media is added from rtMedia. + */ do_action( 'rtmedia_after_add_' . $rtmedia_type ); - do_action( 'rtmedia_after_add_media', $media_ids, $file_object, $uploaded ); + /** + * Action after media is added from rtMedia. + * + * @param array $media_ids rtMedia IDs. + * @param array $file_object File details. + * @param array $uploaded Uploaded media details. + * @param array $attachment_ids Attachment IDs of uploaded media. + */ + do_action( 'rtmedia_after_add_media', $media_ids, $file_object, $uploaded, $attachment_ids ); return $media_ids; } diff --git a/app/main/controllers/template/rtmedia-filters.php b/app/main/controllers/template/rtmedia-filters.php index 0b1f233e9..4eb4ca576 100644 --- a/app/main/controllers/template/rtmedia-filters.php +++ b/app/main/controllers/template/rtmedia-filters.php @@ -297,8 +297,9 @@ function replace_src_with_transcoded_file_url( $html, $rtmedia_media ) { $final_file_url = wp_get_attachment_url( $attachment_id ); } - // Add timestamp to resolve conflict with cache media. - return preg_replace( '/src=["]([^"]+)["]/', 'src="' . $final_file_url . '?' . time() . '"', $html ); + $final_file_url = rtmedia_append_timestamp_in_url( $final_file_url ); + + return preg_replace( '/src=["]([^"]+)["]/', 'src="' . $final_file_url . '"', $html ); } add_filter( 'rtmedia_single_content_filter', 'replace_src_with_transcoded_file_url', 100, 2 ); @@ -418,15 +419,27 @@ function replace_aws_img_urls_from_activities( $content, $activity = '' ) { if ( ! class_exists( 'RTAWSS3_Class' ) && ! class_exists( 'AS3CF_Utils' ) ) { - // for WordPress backward compatibility. + // Get blog_id of activity from rtMedia table. + $rt_activity_model = new RTMediaActivityModel(); + $rtmedia_activity = $rt_activity_model->get_without_blog_id( array( 'activity_id' => $activity->id ) ); + // Switch to activity blog to get correct uploads URL. + if ( ! empty( $rtmedia_activity[0]->blog_id ) ) { + switch_to_blog( $rtmedia_activity[0]->blog_id ); + } + // For WordPress backward compatibility. if ( function_exists( 'wp_get_upload_dir' ) ) { $uploads = wp_get_upload_dir(); } else { $uploads = wp_upload_dir(); } + // Restore current blog if it was switched to other blog. + if ( ! empty( $rtmedia_activity[0]->blog_id ) ) { + restore_current_blog(); + } $baseurl = $uploads['baseurl']; + $thumbnail_url = ''; if ( 0 === strpos( $url, $uploads['baseurl'] ) ) { $thumbnail_url = $url; } else { diff --git a/app/main/controllers/template/rtmedia-functions.php b/app/main/controllers/template/rtmedia-functions.php index 57d81aad5..230ee3686 100644 --- a/app/main/controllers/template/rtmedia-functions.php +++ b/app/main/controllers/template/rtmedia-functions.php @@ -578,18 +578,18 @@ function rtmedia_media( $size_flag = true, $echo = true, $media_size = 'rt_media if ( isset( $rtmedia_media->media_type ) ) { if ( 'photo' === $rtmedia_media->media_type ) { - $src = wp_get_attachment_image_src( $rtmedia_media->media_id, $media_size ); - /** - * Used `set_url_scheme` because `esc_url` breaks the image if there is special characters are there into image name. - * Added by checking the code from "wp-admin/includes/media.php:2740". - * Because in media library, it was not breaking. - * - * Add timestamp to resolve conflict with cache image. - */ - $html = ""; + if ( ! empty( $src[0] ) ) { + $src = rtmedia_append_timestamp_in_url( $src[0] ); + /** + * Used `set_url_scheme` because `esc_url` breaks the image if there is special characters are there into image name. + * Added by checking the code from "wp-admin/includes/media.php:2740". + * Because in media library, it was not breaking. + */ + $html = ""; + } } elseif ( 'video' === $rtmedia_media->media_type ) { $youtube_url = get_rtmedia_meta( $rtmedia_media->id, 'video_url_uploaded_from' ); @@ -746,9 +746,7 @@ function rtmedia_image( $size = 'rt_media_thumbnail', $id = false, $echo = true, } $src = apply_filters( 'rtmedia_media_thumb', $src, $media_object->id, $media_object->media_type ); - - // Added timestamp because conflict with cache image. - $src = $src . '?' . time(); + $src = rtmedia_append_timestamp_in_url( $src ); if ( true === $echo ) { echo wp_kses( set_url_scheme( $src ), RTMedia::expanded_allowed_tags() ); @@ -758,6 +756,24 @@ function rtmedia_image( $size = 'rt_media_thumbnail', $id = false, $echo = true, } +/** + * Appends timestamp at the end of the URL to bypass cache and load fresh image. + * + * @param string $src Image URL. + * + * @return string Modified URL. + */ +function rtmedia_append_timestamp_in_url( $src ) { + $src_query = wp_parse_url( $src, PHP_URL_QUERY ); + if ( empty( $src_query ) ) { + $src .= '?' . time(); + } elseif ( false === strpos( $src, 'amazonaws.com' ) ) { + $src .= '&' . time(); + } + + return $src; +} + /** * Get media alt * @@ -3121,22 +3137,22 @@ function rtmedia_who_like_html( $like_count = false, $user_like_it = false ) { } /** - * Get music cover art + * Get music cover art. * * @param object $media_object Media details object. * - * @return bool|string + * @return string|bool Uploaded thumbnail URL | False. */ function rtm_get_music_cover_art( $media_object ) { - // return URL if cover_art already set. + // Return URL if cover_art already set. $url = $media_object->cover_art; if ( ! empty( $url ) && ! is_numeric( $url ) ) { return $url; } - // return false if covert_art is already analyzed earlier. + // Return false if covert_art is already analyzed earlier. if ( -1 === intval( $url ) ) { return false; } @@ -3147,25 +3163,25 @@ function rtm_get_music_cover_art( $media_object ) { $media_tags = new RTMediaTags( $file ); $title_info = $media_tags->title; $image_info = $media_tags->image; - $image_mime = $image_info['mime']; - $mime = explode( '/', $image_mime ); $id = $media_object->id; - if ( ! empty( $image_info['data'] ) ) { + if ( ! empty( $image_info['data'] ) && ! empty( $image_info['mime'] ) ) { + $mime = explode( '/', $image_info['mime'] ); - $thumb_upload_info = wp_upload_bits( $title_info . '.' . $mime[ count( $mime ) - 1 ], null, $image_info['data'] ); - - if ( is_array( $thumb_upload_info ) && ! empty( $thumb_upload_info['url'] ) ) { - $media_obj->model->update( - array( - 'cover_art' => $thumb_upload_info['url'], - ), - array( - 'id' => $id, - ) - ); + if ( ! empty( $mime ) && is_array( $mime ) ) { + $thumb_upload_info = wp_upload_bits( $title_info . '.' . $mime[ count( $mime ) - 1 ], null, $image_info['data'] ); + if ( ! empty( $thumb_upload_info['url'] ) ) { + $media_obj->model->update( + array( + 'cover_art' => $thumb_upload_info['url'], + ), + array( + 'id' => $id, + ) + ); - return $thumb_upload_info['url']; + return $thumb_upload_info['url']; + } } } @@ -3179,7 +3195,6 @@ function rtm_get_music_cover_art( $media_object ) { ); return false; - } if ( ! function_exists( 'get_music_cover_art' ) ) { @@ -3308,7 +3323,9 @@ function rtmedia_convert_date( $_date ) { $no = $diff / $length[ $i ]; while ( $i >= 0 && $no <= 1 ) { $i--; - $no = $diff / $length[ $i ]; + if ( $i >= 0 ) { + $no = $diff / $length[ $i ]; + } } if ( $i < 0 ) { diff --git a/app/main/controllers/upload/RTMediaUploadEndpoint.php b/app/main/controllers/upload/RTMediaUploadEndpoint.php index d276e6998..2821ec916 100755 --- a/app/main/controllers/upload/RTMediaUploadEndpoint.php +++ b/app/main/controllers/upload/RTMediaUploadEndpoint.php @@ -270,23 +270,25 @@ public function template_redirect( $create_activity = true ) { } $obj_activity = new RTMediaActivity( $update_activity_media, $privacy, false ); - global $wpdb, $bp; - $user = get_userdata( $same_medias[0]->media_author ); - $username = '' . esc_html( $user->display_name ) . ''; - - // translators: 1: Username, 2: Number of medias, 3: Media slug. - $action = sprintf( esc_html__( '%1$s added %2$d %3$s', 'buddypress-media' ), $username, count( $same_medias ), RTMEDIA_MEDIA_SLUG ); - $action = apply_filters( 'rtmedia_buddypress_action_text_fitler_multiple_media', $action, $username, count( $same_medias ), $user->display_name ); - - $wpdb->update( - $bp->activity->table_name, - array( - 'type' => 'rtmedia_update', - 'content' => $obj_activity->create_activity_html(), - 'action' => $action, - ), - array( 'id' => $activity_id ) - ); + if ( ! empty( $same_medias[0] ) && ! empty( $activity_id ) ) { + global $wpdb, $bp; + $user = get_userdata( $same_medias[0]->media_author ); + $username = '' . esc_html( $user->display_name ) . ''; + + // translators: 1: Username, 2: Number of medias, 3: Media slug. + $action = sprintf( esc_html__( '%1$s added %2$d %3$s', 'buddypress-media' ), $username, count( $same_medias ), RTMEDIA_MEDIA_SLUG ); + $action = apply_filters( 'rtmedia_buddypress_action_text_fitler_multiple_media', $action, $username, count( $same_medias ), $user->display_name ); + + $wpdb->update( + $bp->activity->table_name, + array( + 'type' => 'rtmedia_update', + 'content' => $obj_activity->create_activity_html(), + 'action' => $action, + ), + array( 'id' => $activity_id ) + ); + } } // update group last active. diff --git a/bin/.travis.yml b/bin/.travis.yml index d40b82593..af20c78c2 100644 --- a/bin/.travis.yml +++ b/bin/.travis.yml @@ -56,7 +56,7 @@ before_script: - cd $PLUGIN_DIR/tests/codeception/ # - composer update - composer install - - export PATH="$PATH:/home/travis/build/rtMediaWP/rtMedia/tests/codeception/vendor/bin" + - export PATH="$PATH:/home/travis/build/rtCamp/rtMedia/tests/codeception/vendor/bin" ## PHP_CodeSniffer - git clone https://github.com/squizlabs/PHP_CodeSniffer.git - cd PHP_CodeSniffer diff --git a/index.php b/index.php index 4d2b73504..df37472f6 100755 --- a/index.php +++ b/index.php @@ -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.6.3 + Version: 4.6.4 Author: rtCamp Text Domain: buddypress-media Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media @@ -21,7 +21,7 @@ /** * The version of the plugin */ - define( 'RTMEDIA_VERSION', '4.6.3' ); + define( 'RTMEDIA_VERSION', '4.6.4' ); } if ( ! defined( 'RTMEDIA_PATH' ) ) { diff --git a/languages/buddypress-media.po b/languages/buddypress-media.po index bad631d44..b90591241 100644 --- a/languages/buddypress-media.po +++ b/languages/buddypress-media.po @@ -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.6.3\n" +"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.4\n" "Report-Msgid-Bugs-To: https://rtmedia.io/support/\n" -"POT-Creation-Date: 2020-04-30 10:14:18+00:00\n" +"POT-Creation-Date: 2020-07-15 12:31:21+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -2286,7 +2286,7 @@ msgid "No time remaining." msgstr "" #: app/main/RTMedia.php:162 app/main/RTMedia.php:1498 -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:744 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:727 #: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:112 #: app/main/controllers/upload/processors/RTMediaUploadFile.php:246 msgid "Media Files" @@ -2460,16 +2460,16 @@ msgstr "" #: app/main/RTMedia.php:1344 #: app/main/controllers/media/RTMediaGalleryItemAction.php:86 #: app/main/controllers/media/RTMediaGalleryItemAction.php:109 -#: app/main/controllers/template/rtmedia-functions.php:1261 -#: app/main/controllers/template/rtmedia-functions.php:1280 +#: app/main/controllers/template/rtmedia-functions.php:1277 +#: app/main/controllers/template/rtmedia-functions.php:1296 msgid "Edit" msgstr "" #: app/main/RTMedia.php:1345 #: app/main/controllers/media/RTMediaGalleryItemAction.php:89 #: app/main/controllers/media/RTMediaGalleryItemAction.php:109 -#: app/main/controllers/template/rtmedia-functions.php:2220 -#: app/main/controllers/template/rtmedia-functions.php:2229 +#: app/main/controllers/template/rtmedia-functions.php:2236 +#: app/main/controllers/template/rtmedia-functions.php:2245 #: templates/media/album-single-edit.php:94 msgid "Delete" msgstr "" @@ -2558,61 +2558,61 @@ msgstr "" msgid "I agree to" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:457 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:456 #: app/main/controllers/upload/RTMediaUploadEndpoint.php:60 #: app/main/controllers/upload/RTMediaUploadEndpoint.php:74 msgid "Terms and Conditions checkbox not found!" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:791 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:774 #: app/main/controllers/media/RTMediaComment.php:204 #: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:125 -#: app/main/controllers/template/rtmedia-functions.php:2259 +#: app/main/controllers/template/rtmedia-functions.php:2275 msgid "You are not allowed to upload/attach media." msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:938 -#: app/main/controllers/media/RTMediaMedia.php:782 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:921 +#: app/main/controllers/media/RTMediaMedia.php:793 #. translators: 1: user link, 2: media. #. translators: 1: username, 2: media type, 3: media name, 4: total media. msgid "%1$s added a %2$s" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:946 -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:949 -#: app/main/controllers/upload/RTMediaUploadEndpoint.php:278 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:929 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:932 +#: app/main/controllers/upload/RTMediaUploadEndpoint.php:279 #. translators: 1: user link, 2: media count, 3: media. #. translators: 1: user link, 2: media count, 3: rtMedia slug. #. translators: 1: Username, 2: Number of medias, 3: Media slug. msgid "%1$s added %2$d %3$s" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1003 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:986 #. translators: 1: username, 2: media, 3: group name. msgid "%1$s liked a %2$s in the group %3$s" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1007 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:990 #. translators: 1: username, 2: media. msgid "%1$s liked their %2$s" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1012 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:995 #. translators: 1: username, 2: author, 3: media. msgid "%1$s liked %2$s's %3$s" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1102 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1085 #. translators: 1: username, 2: media, 3: group name. msgid "%1$s commented on a %2$s in the group %3$s" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1107 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1090 #. translators: 1: username, 2: media. msgid "%1$s commented on their %2$s" msgstr "" -#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1112 +#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1095 #. translators: 1: username, 2: author, 3: media. msgid "%1$s commented on %2$s's %3$s" msgstr "" @@ -2997,11 +2997,11 @@ msgstr "" msgid " to login." msgstr "" -#: app/main/controllers/media/RTMediaMedia.php:650 +#: app/main/controllers/media/RTMediaMedia.php:661 msgid "Error creating attachment for the media file, please try again" msgstr "" -#: app/main/controllers/media/RTMediaMedia.php:782 +#: app/main/controllers/media/RTMediaMedia.php:793 msgid "%1$s added %4$d %3$s" msgstr "" @@ -3168,7 +3168,7 @@ msgid "Doing wrong, invalid AJAX request!" msgstr "" #: app/main/controllers/template/rtmedia-ajax-actions.php:144 -#: app/main/controllers/template/rtmedia-functions.php:2157 +#: app/main/controllers/template/rtmedia-functions.php:2173 msgid "Comment" msgstr "" @@ -3184,202 +3184,202 @@ msgstr "" msgid "Delete Album" msgstr "" -#: app/main/controllers/template/rtmedia-filters.php:918 -#: app/main/controllers/template/rtmedia-functions.php:4633 +#: app/main/controllers/template/rtmedia-filters.php:931 +#: app/main/controllers/template/rtmedia-functions.php:4650 msgid "rtMedia Shortcode Uploads" msgstr "" -#: app/main/controllers/template/rtmedia-filters.php:922 -#: app/main/controllers/template/rtmedia-functions.php:4515 +#: app/main/controllers/template/rtmedia-filters.php:935 +#: app/main/controllers/template/rtmedia-functions.php:4532 msgid "rtMedia Activities" msgstr "" -#: app/main/controllers/template/rtmedia-filters.php:926 +#: app/main/controllers/template/rtmedia-filters.php:939 msgid "rtMedia Comments" msgstr "" -#: app/main/controllers/template/rtmedia-filters.php:930 -#: app/main/controllers/template/rtmedia-functions.php:4860 +#: app/main/controllers/template/rtmedia-filters.php:943 +#: app/main/controllers/template/rtmedia-functions.php:4877 msgid "rtMedia Media Views" msgstr "" -#: app/main/controllers/template/rtmedia-filters.php:934 -#: app/main/controllers/template/rtmedia-functions.php:4961 +#: app/main/controllers/template/rtmedia-filters.php:947 +#: app/main/controllers/template/rtmedia-functions.php:4978 msgid "rtMedia Media Likes" msgstr "" -#: app/main/controllers/template/rtmedia-filters.php:952 +#: app/main/controllers/template/rtmedia-filters.php:965 msgid "rtMedia Eraser" msgstr "" -#: app/main/controllers/template/rtmedia-filters.php:957 +#: app/main/controllers/template/rtmedia-filters.php:970 msgid "rtMedia Likes Eraser" msgstr "" -#: app/main/controllers/template/rtmedia-filters.php:962 +#: app/main/controllers/template/rtmedia-filters.php:975 msgid "rtMedia Album Eraser" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:1346 +#: app/main/controllers/template/rtmedia-functions.php:1362 msgid "There are no comments on this media yet." msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:1382 +#: app/main/controllers/template/rtmedia-functions.php:1398 #. translators: %s Count of comments. msgid "Show all %s comments" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:1415 +#: app/main/controllers/template/rtmedia-functions.php:1431 msgid "Delete Comment" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:1773 +#: app/main/controllers/template/rtmedia-functions.php:1789 msgid "Go to page no : " msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:1778 +#: app/main/controllers/template/rtmedia-functions.php:1794 msgid "Go" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:2155 +#: app/main/controllers/template/rtmedia-functions.php:2171 msgid "Type Comment..." msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:2220 -#: app/main/controllers/template/rtmedia-functions.php:2229 +#: app/main/controllers/template/rtmedia-functions.php:2236 +#: app/main/controllers/template/rtmedia-functions.php:2245 msgid "Delete Media" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:2483 +#: app/main/controllers/template/rtmedia-functions.php:2499 msgid "Profile Albums" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:2487 -#: app/main/controllers/template/rtmedia-functions.php:2536 +#: app/main/controllers/template/rtmedia-functions.php:2503 +#: app/main/controllers/template/rtmedia-functions.php:2552 msgid "Group Albums" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:2717 +#: app/main/controllers/template/rtmedia-functions.php:2733 msgid "Privacy : " msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3069 +#: app/main/controllers/template/rtmedia-functions.php:3085 msgid "You like this" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3083 +#: app/main/controllers/template/rtmedia-functions.php:3099 msgid "You and " msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3106 +#: app/main/controllers/template/rtmedia-functions.php:3122 msgid " person likes this" msgid_plural " people like this" msgstr[0] "" msgstr[1] "" -#: app/main/controllers/template/rtmedia-functions.php:3227 +#: app/main/controllers/template/rtmedia-functions.php:3242 msgid "Public" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3232 +#: app/main/controllers/template/rtmedia-functions.php:3247 msgid "All members" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3237 +#: app/main/controllers/template/rtmedia-functions.php:3252 msgid "Your friends" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3242 +#: app/main/controllers/template/rtmedia-functions.php:3257 msgid "Only you" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3247 +#: app/main/controllers/template/rtmedia-functions.php:3262 msgid "Blocked temporarily" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3305 +#: app/main/controllers/template/rtmedia-functions.php:3320 #. translators: %s: count of hour/minute/second. msgid "%s ago " msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:3325 +#: app/main/controllers/template/rtmedia-functions.php:3342 #. translators: %s: number of seconds. msgid "%s second" msgid_plural "%s seconds" msgstr[0] "" msgstr[1] "" -#: app/main/controllers/template/rtmedia-functions.php:3330 +#: app/main/controllers/template/rtmedia-functions.php:3347 #. translators: %s: number of minutes. msgid "%s minute" msgid_plural "%s minutes" msgstr[0] "" msgstr[1] "" -#: app/main/controllers/template/rtmedia-functions.php:3335 +#: app/main/controllers/template/rtmedia-functions.php:3352 #. translators: %s: number of hours. msgid "%s hour" msgid_plural "%s hours" msgstr[0] "" msgstr[1] "" -#: app/main/controllers/template/rtmedia-functions.php:3962 +#: app/main/controllers/template/rtmedia-functions.php:3979 #. translators: %s: date format, see http:php.net/date. msgid "View Conversation" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4541 +#: app/main/controllers/template/rtmedia-functions.php:4558 msgid "Activity Date" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4545 +#: app/main/controllers/template/rtmedia-functions.php:4562 msgid "Activity Content" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4549 -#: app/main/controllers/template/rtmedia-functions.php:4770 +#: app/main/controllers/template/rtmedia-functions.php:4566 +#: app/main/controllers/template/rtmedia-functions.php:4787 msgid "Attachments" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4642 +#: app/main/controllers/template/rtmedia-functions.php:4659 msgid "Media Upload Date" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4646 +#: app/main/controllers/template/rtmedia-functions.php:4663 msgid "Media Title" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4650 -#: app/main/controllers/template/rtmedia-functions.php:4864 -#: app/main/controllers/template/rtmedia-functions.php:4965 +#: app/main/controllers/template/rtmedia-functions.php:4667 +#: app/main/controllers/template/rtmedia-functions.php:4881 +#: app/main/controllers/template/rtmedia-functions.php:4982 msgid "Media URL" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4654 +#: app/main/controllers/template/rtmedia-functions.php:4671 msgid "Album Title" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4742 +#: app/main/controllers/template/rtmedia-functions.php:4759 msgid "rtMedia Activity Comments" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4762 +#: app/main/controllers/template/rtmedia-functions.php:4779 msgid "Comment Date" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4766 +#: app/main/controllers/template/rtmedia-functions.php:4783 msgid "Comment Content" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4868 +#: app/main/controllers/template/rtmedia-functions.php:4885 msgid "Number of Views" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4872 +#: app/main/controllers/template/rtmedia-functions.php:4889 msgid "Date of First View" msgstr "" -#: app/main/controllers/template/rtmedia-functions.php:4969 +#: app/main/controllers/template/rtmedia-functions.php:4986 msgid "Date" msgstr "" @@ -3473,7 +3473,7 @@ msgid "Album List" msgstr "" #: templates/media/album-gallery.php:83 templates/media/media-gallery.php:123 -#: templates/media/media-single-edit.php:73 +#: templates/media/media-single-edit.php:74 #: templates/media/media-single.php:212 msgid "Sorry !! There's no media found for the request !!" msgstr "" @@ -3497,7 +3497,7 @@ msgid "Description: " msgstr "" #: templates/media/album-single-edit.php:71 -#: templates/media/media-single-edit.php:60 +#: templates/media/media-single-edit.php:61 msgid "Back" msgstr "" @@ -3537,11 +3537,11 @@ msgstr "" msgid "Media Gallery" msgstr "" -#: templates/media/media-single-edit.php:58 +#: templates/media/media-single-edit.php:60 msgid "Save" msgstr "" -#: templates/media/media-single-edit.php:67 +#: templates/media/media-single-edit.php:68 msgid "Sorry !! You do not have rights to edit this media" msgstr "" diff --git a/readme.txt b/readme.txt index 5e01034e6..dcd355c14 100755 --- a/readme.txt +++ b/readme.txt @@ -4,8 +4,8 @@ Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, i 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.4 -Stable tag: 4.6.3 +Tested up to: 5.4.2 +Stable tag: 4.6.4 Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices. @@ -134,6 +134,22 @@ http://www.youtube.com/watch?v=dJrykKQGDcs == Changelog == += 4.6.4 [July 16, 2020] = + +* Enhancement + + * Support for Amazon S3 presigned URLs + * Add attachment_ids in `rtmedia_after_add_media` action hook + +* FIXED + + * Console errors on media editing + * Extension getting changed when renaming media before upload + * Activities not in sync with other subsites in a multisite network, when each subsite has a separate BuddyPress activity feed + * PHP Notices and Warnings + * Comment nesting issue with media activities + * Wrong timestamp while adding comments + = 4.6.3 [April 30, 2020] = * FIXED @@ -1693,8 +1709,8 @@ http://www.youtube.com/watch?v=dJrykKQGDcs == Upgrade Notice == -= 4.6.3 = -rtMedia 4.6.3 with added fix for fatal errors issue with Yoast plugin along with the missing timestamp of media and added script tag for rtMedia social sync add-on += 4.6.4 = +rtMedia 4.6.4 with support for Amazon S3 presigned URLs, along with some fixes such as: issue with nested comments, activities sync issue in a multisite network and other small fixes and improvements. == Sponsors == diff --git a/templates/media/media-single-edit.php b/templates/media/media-single-edit.php index eeb9b9abf..f0027f55c 100755 --- a/templates/media/media-single-edit.php +++ b/templates/media/media-single-edit.php @@ -55,9 +55,10 @@