Skip to content

Commit

Permalink
Merge pull request #2041 from rtCamp/develop
Browse files Browse the repository at this point in the history
Release 4.8.18
  • Loading branch information
pavanpatil1 authored Jan 16, 2024
2 parents f711d8d + 89311de commit 2502149
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 128 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ https://www.youtube.com/watch?v=dJrykKQGDcs

## Changelog ##

### 4.6.18 [January 16, 2024] ###

* Fixed

* Fixed group media issue.
* Fix styles of search box.
* Add compatibility with BuddyPress legacy template pack.
* Enhance security for plugin update checker.

### 4.6.17 [January 2, 2024] ###

* Enhancement
Expand Down
36 changes: 24 additions & 12 deletions app/assets/css/rtmedia.css
Original file line number Diff line number Diff line change
Expand Up @@ -2912,7 +2912,7 @@ h2.rtm-gallery-title {
}
.rtm-media-options .dashicons {
font-size: inherit;
line-height: 1.4;
line-height: 1.2;
}

#buddypress .media_search.media_search .search_by {
Expand Down Expand Up @@ -2987,9 +2987,14 @@ h2.rtm-gallery-title {
float: right;
border: 1px solid #ccc;
margin-left: 5px;
padding: 3px 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.media_search.media_search .media_search_input {
.media_search.media_search input.media_search_input {
width: 200px;
outline: 0;
max-width: 200px;
Expand Down Expand Up @@ -3019,19 +3024,26 @@ h2.rtm-gallery-title {
height: 15px;
top: 24%;
}
.media_search.media_search .search_option {
.media_search.media_search #media_search_remove, .media_search.media_search #media_search, .media_search.media_search .search_option {
padding: 0;
background: transparent;
color: #000;
margin-bottom: 0;
line-height: 1;
margin: 0;
border: none;
line-height: 1.2;
border-radius: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.media_search.media_search .media_search_remove.search_option {
display: none;
.media_search.media_search #media_search {
padding: 0 5px;
-ms-flex-item-align: stretch;
align-self: stretch;
}
.media_search.media_search .media_search_remove.search_option i {
margin-top: 4px;
.media_search.media_search #media_search_remove {
display: none;
}
.media_search.media_search .search_by {
background: transparent;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/css/rtmedia.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/css/rtmedia.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/css/rtmedia.min.css.map

Large diffs are not rendered by default.

29 changes: 16 additions & 13 deletions app/assets/css/sass/_media-tab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ h2.rtm-gallery-title {

.dashicons {
font-size: inherit;
line-height: 1.4;
line-height: 1.2;
}
}

Expand Down Expand Up @@ -313,9 +313,10 @@ h2.rtm-gallery-title {
float: right;
border: 1px solid #ccc;
margin-left: 5px;
padding: 3px 0;
display: flex;
align-items: center;

.media_search_input {
input.media_search_input {
width: 200px;
outline: 0;
max-width: 200px;
Expand Down Expand Up @@ -348,21 +349,23 @@ h2.rtm-gallery-title {
}
}

.search_option {
#media_search_remove, #media_search, .search_option {
padding: 0;
background: transparent;
color: #000;
margin-bottom: 0;
line-height: 1;
margin: 0;
border: none;
line-height: 1.2;
border-radius: 0;
display: flex;
align-items: center;
}

.media_search_remove.search_option {
display: none;
#media_search {
padding: 0 5px;
align-self: stretch;
}

i {
margin-top: 4px;
}
#media_search_remove {
display: none;
}

.search_by {
Expand Down
57 changes: 37 additions & 20 deletions app/assets/js/rtMedia.backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,12 @@ jQuery( document ).ready( function( $ ) {
* By: Yahil
*/
if ( '' === jQuery( '#whats-new' ).val().trim() ) {
if ( rtmedia_activity_text_with_attachment != 'disable' ) {
if ( rtmedia_activity_text_with_attachment == 'disable' ) {
if ( 'legacy' === bp_template_pack ) {
$('#whats-new').css('color', 'transparent');
$('#whats-new').val(' ');
}
} else {
jQuery('#whats-new-form').prepend('<div id="message" class="error bp-ajax-message" style="display: block;"><p> ' + rtmedia_empty_activity_msg + ' </p></div>')
jQuery( '#whats-new' ).removeAttr( 'disabled' );
return false;
Expand Down Expand Up @@ -1532,36 +1537,36 @@ jQuery( document ).ready( function( $ ) {
}
} );

var object = '';
var object = 'profile';
var item_id = 0;

if ( 'legacy' === bp_template_pack ) {
if ( jQuery( '#whats-new-post-in' ).length ) {
item_id = jQuery( '#whats-new-post-in' ).val();
} else if ( jQuery( '.groups-header' ).length ) {
item_id = jQuery( '.groups-header' ).attr( 'data-bp-item-id' );
if ( jQuery( '#whats-new-post-in' ).length > 0 ) {
item_id = jQuery('#whats-new-post-in').val();
}

if ( item_id > 0 ) {
object = 'group';
} else {
object = 'profile';
/* Set object for non-profile posts */
if ( item_id > 0 && jQuery('#whats-new-post-object').length > 0 ) {
object = jQuery('#whats-new-post-object').val();
}
} else {
var whatsNewPostIn = jQuery( '#whats-new-post-in' );
if ( whatsNewPostIn.length ) {
object = whatsNewPostIn.val();
item_id = 0;
} else {
object = 'profile';
if ( 'undefined' !== typeof BP_Nouveau?.activity?.params?.object ) {
object = BP_Nouveau.activity.params.object;
}

var contextData = jQuery( '#whats-new-post-in-box-items li.bp-activity-object.selected input[type="hidden"]' );
if ( contextData.length ) {
item_id = contextData.val();
if ( 'undefined' !== typeof BP_Nouveau?.activity?.params?.item_id ) {
item_id = BP_Nouveau.activity.params.item_id;
} else if ( ( 'profile' === object || 'user' === object ) && 'undefined' !== typeof BP_Nouveau?.activity?.params?.user_id ) {
item_id = BP_Nouveau.activity.params.user_id;
}
}

if ( 'groups' === object ) {
object = 'group';
} else if ( 'user' === object ) {
object = 'profile';
}

up.settings.multipart_params.context = object;
up.settings.multipart_params.context_id = item_id;
up.settings.multipart_params.title = files.title;
Expand All @@ -1585,6 +1590,13 @@ jQuery( document ).ready( function( $ ) {
* Blank error display issue resolved
*/
if ( bp_template_pack && 'legacy' !== bp_template_pack ) {

if ( 'legacy' === bp_template_pack && 'disable' === rtmedia_activity_text_with_attachment && '' === jQuery.trim( jQuery( '#whats-new' ).val() ) ) {
let textarea = jQuery( '#whats-new' );
textarea.css( 'color', 'transparent' );
textarea.val( ' ' );
}

jQuery( '#whats-new-form' ).submit();
} else {
jQuery( '#aw-whats-new-submit' ).click();
Expand Down Expand Up @@ -1682,7 +1694,12 @@ jQuery( document ).ready( function( $ ) {
* By: Yahil
*/

if ( rtmedia_activity_text_with_attachment != 'disable') {
if ( rtmedia_activity_text_with_attachment == 'disable') {
if ( 'legacy' === bp_template_pack ) {
$( '#whats-new' ).css( 'color', 'transparent' );
$( '#whats-new' ).val( '&nbsp;' );
}
} else {
jQuery('#whats-new-form').prepend('<div id="message" class="error bp-ajax-message" style="display: block;"><p> ' + rtmedia_empty_activity_msg + ' </p></div>')
jQuery( '#whats-new' ).removeAttr( 'disabled' );
return false;
Expand Down
7 changes: 4 additions & 3 deletions app/main/controllers/template/rtmedia-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3881,11 +3881,12 @@ function rtmedia_activate_addon_license( $addon = array() ) {
);

// Call the custom API.
$response = wp_remote_get(
esc_url_raw( add_query_arg( $api_params, $store_url ) ),
$response = wp_remote_post(
esc_url_raw( $store_url ),
array(
'timeout' => 15,
'timeout' => 15,
'sslverify' => false,
'body' => $api_params,
)
);

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.6.17
* Version: 4.6.18
* Author: rtCamp
* Text Domain: buddypress-media
* Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
Expand All @@ -19,7 +19,7 @@
/**
* The version of the plugin
*/
define( 'RTMEDIA_VERSION', '4.6.17' );
define( 'RTMEDIA_VERSION', '4.6.18' );
}

if ( ! defined( 'RTMEDIA_PATH' ) ) {
Expand Down
Loading

0 comments on commit 2502149

Please sign in to comment.