Skip to content

Commit 2502149

Browse files
authored
Merge pull request #2041 from rtCamp/develop
Release 4.8.18
2 parents f711d8d + 89311de commit 2502149

File tree

11 files changed

+182
-128
lines changed

11 files changed

+182
-128
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
152152

153153
## Changelog ##
154154

155+
### 4.6.18 [January 16, 2024] ###
156+
157+
* Fixed
158+
159+
* Fixed group media issue.
160+
* Fix styles of search box.
161+
* Add compatibility with BuddyPress legacy template pack.
162+
* Enhance security for plugin update checker.
163+
155164
### 4.6.17 [January 2, 2024] ###
156165

157166
* Enhancement

app/assets/css/rtmedia.css

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,7 @@ h2.rtm-gallery-title {
29122912
}
29132913
.rtm-media-options .dashicons {
29142914
font-size: inherit;
2915-
line-height: 1.4;
2915+
line-height: 1.2;
29162916
}
29172917

29182918
#buddypress .media_search.media_search .search_by {
@@ -2987,9 +2987,14 @@ h2.rtm-gallery-title {
29872987
float: right;
29882988
border: 1px solid #ccc;
29892989
margin-left: 5px;
2990-
padding: 3px 0;
2990+
display: -webkit-box;
2991+
display: -ms-flexbox;
2992+
display: flex;
2993+
-webkit-box-align: center;
2994+
-ms-flex-align: center;
2995+
align-items: center;
29912996
}
2992-
.media_search.media_search .media_search_input {
2997+
.media_search.media_search input.media_search_input {
29932998
width: 200px;
29942999
outline: 0;
29953000
max-width: 200px;
@@ -3019,19 +3024,26 @@ h2.rtm-gallery-title {
30193024
height: 15px;
30203025
top: 24%;
30213026
}
3022-
.media_search.media_search .search_option {
3027+
.media_search.media_search #media_search_remove, .media_search.media_search #media_search, .media_search.media_search .search_option {
30233028
padding: 0;
3024-
background: transparent;
3025-
color: #000;
3026-
margin-bottom: 0;
3027-
line-height: 1;
3029+
margin: 0;
30283030
border: none;
3031+
line-height: 1.2;
3032+
border-radius: 0;
3033+
display: -webkit-box;
3034+
display: -ms-flexbox;
3035+
display: flex;
3036+
-webkit-box-align: center;
3037+
-ms-flex-align: center;
3038+
align-items: center;
30293039
}
3030-
.media_search.media_search .media_search_remove.search_option {
3031-
display: none;
3040+
.media_search.media_search #media_search {
3041+
padding: 0 5px;
3042+
-ms-flex-item-align: stretch;
3043+
align-self: stretch;
30323044
}
3033-
.media_search.media_search .media_search_remove.search_option i {
3034-
margin-top: 4px;
3045+
.media_search.media_search #media_search_remove {
3046+
display: none;
30353047
}
30363048
.media_search.media_search .search_by {
30373049
background: transparent;

app/assets/css/rtmedia.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/css/rtmedia.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/css/rtmedia.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/css/sass/_media-tab.scss

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ h2.rtm-gallery-title {
184184

185185
.dashicons {
186186
font-size: inherit;
187-
line-height: 1.4;
187+
line-height: 1.2;
188188
}
189189
}
190190

@@ -313,9 +313,10 @@ h2.rtm-gallery-title {
313313
float: right;
314314
border: 1px solid #ccc;
315315
margin-left: 5px;
316-
padding: 3px 0;
316+
display: flex;
317+
align-items: center;
317318

318-
.media_search_input {
319+
input.media_search_input {
319320
width: 200px;
320321
outline: 0;
321322
max-width: 200px;
@@ -348,21 +349,23 @@ h2.rtm-gallery-title {
348349
}
349350
}
350351

351-
.search_option {
352+
#media_search_remove, #media_search, .search_option {
352353
padding: 0;
353-
background: transparent;
354-
color: #000;
355-
margin-bottom: 0;
356-
line-height: 1;
354+
margin: 0;
357355
border: none;
356+
line-height: 1.2;
357+
border-radius: 0;
358+
display: flex;
359+
align-items: center;
358360
}
359361

360-
.media_search_remove.search_option {
361-
display: none;
362+
#media_search {
363+
padding: 0 5px;
364+
align-self: stretch;
365+
}
362366

363-
i {
364-
margin-top: 4px;
365-
}
367+
#media_search_remove {
368+
display: none;
366369
}
367370

368371
.search_by {

app/assets/js/rtMedia.backbone.js

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,12 @@ jQuery( document ).ready( function( $ ) {
14321432
* By: Yahil
14331433
*/
14341434
if ( '' === jQuery( '#whats-new' ).val().trim() ) {
1435-
if ( rtmedia_activity_text_with_attachment != 'disable' ) {
1435+
if ( rtmedia_activity_text_with_attachment == 'disable' ) {
1436+
if ( 'legacy' === bp_template_pack ) {
1437+
$('#whats-new').css('color', 'transparent');
1438+
$('#whats-new').val(' ');
1439+
}
1440+
} else {
14361441
jQuery('#whats-new-form').prepend('<div id="message" class="error bp-ajax-message" style="display: block;"><p> ' + rtmedia_empty_activity_msg + ' </p></div>')
14371442
jQuery( '#whats-new' ).removeAttr( 'disabled' );
14381443
return false;
@@ -1532,36 +1537,36 @@ jQuery( document ).ready( function( $ ) {
15321537
}
15331538
} );
15341539

1535-
var object = '';
1540+
var object = 'profile';
15361541
var item_id = 0;
15371542

15381543
if ( 'legacy' === bp_template_pack ) {
1539-
if ( jQuery( '#whats-new-post-in' ).length ) {
1540-
item_id = jQuery( '#whats-new-post-in' ).val();
1541-
} else if ( jQuery( '.groups-header' ).length ) {
1542-
item_id = jQuery( '.groups-header' ).attr( 'data-bp-item-id' );
1544+
if ( jQuery( '#whats-new-post-in' ).length > 0 ) {
1545+
item_id = jQuery('#whats-new-post-in').val();
15431546
}
15441547

1545-
if ( item_id > 0 ) {
1546-
object = 'group';
1547-
} else {
1548-
object = 'profile';
1548+
/* Set object for non-profile posts */
1549+
if ( item_id > 0 && jQuery('#whats-new-post-object').length > 0 ) {
1550+
object = jQuery('#whats-new-post-object').val();
15491551
}
15501552
} else {
1551-
var whatsNewPostIn = jQuery( '#whats-new-post-in' );
1552-
if ( whatsNewPostIn.length ) {
1553-
object = whatsNewPostIn.val();
1554-
item_id = 0;
1555-
} else {
1556-
object = 'profile';
1553+
if ( 'undefined' !== typeof BP_Nouveau?.activity?.params?.object ) {
1554+
object = BP_Nouveau.activity.params.object;
15571555
}
15581556

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

1564+
if ( 'groups' === object ) {
1565+
object = 'group';
1566+
} else if ( 'user' === object ) {
1567+
object = 'profile';
1568+
}
1569+
15651570
up.settings.multipart_params.context = object;
15661571
up.settings.multipart_params.context_id = item_id;
15671572
up.settings.multipart_params.title = files.title;
@@ -1585,6 +1590,13 @@ jQuery( document ).ready( function( $ ) {
15851590
* Blank error display issue resolved
15861591
*/
15871592
if ( bp_template_pack && 'legacy' !== bp_template_pack ) {
1593+
1594+
if ( 'legacy' === bp_template_pack && 'disable' === rtmedia_activity_text_with_attachment && '' === jQuery.trim( jQuery( '#whats-new' ).val() ) ) {
1595+
let textarea = jQuery( '#whats-new' );
1596+
textarea.css( 'color', 'transparent' );
1597+
textarea.val( ' ' );
1598+
}
1599+
15881600
jQuery( '#whats-new-form' ).submit();
15891601
} else {
15901602
jQuery( '#aw-whats-new-submit' ).click();
@@ -1682,7 +1694,12 @@ jQuery( document ).ready( function( $ ) {
16821694
* By: Yahil
16831695
*/
16841696

1685-
if ( rtmedia_activity_text_with_attachment != 'disable') {
1697+
if ( rtmedia_activity_text_with_attachment == 'disable') {
1698+
if ( 'legacy' === bp_template_pack ) {
1699+
$( '#whats-new' ).css( 'color', 'transparent' );
1700+
$( '#whats-new' ).val( '&nbsp;' );
1701+
}
1702+
} else {
16861703
jQuery('#whats-new-form').prepend('<div id="message" class="error bp-ajax-message" style="display: block;"><p> ' + rtmedia_empty_activity_msg + ' </p></div>')
16871704
jQuery( '#whats-new' ).removeAttr( 'disabled' );
16881705
return false;

app/main/controllers/template/rtmedia-functions.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3881,11 +3881,12 @@ function rtmedia_activate_addon_license( $addon = array() ) {
38813881
);
38823882

38833883
// Call the custom API.
3884-
$response = wp_remote_get(
3885-
esc_url_raw( add_query_arg( $api_params, $store_url ) ),
3884+
$response = wp_remote_post(
3885+
esc_url_raw( $store_url ),
38863886
array(
3887-
'timeout' => 15,
3887+
'timeout' => 15,
38883888
'sslverify' => false,
3889+
'body' => $api_params,
38893890
)
38903891
);
38913892

index.php

Lines changed: 2 additions & 2 deletions
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.6.17
6+
* Version: 4.6.18
77
* Author: rtCamp
88
* Text Domain: buddypress-media
99
* Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
@@ -19,7 +19,7 @@
1919
/**
2020
* The version of the plugin
2121
*/
22-
define( 'RTMEDIA_VERSION', '4.6.17' );
22+
define( 'RTMEDIA_VERSION', '4.6.18' );
2323
}
2424

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

0 commit comments

Comments
 (0)