Skip to content

Commit 84cd398

Browse files
Merge pull request #1708 from rtCamp/develop
Version update v4.6.5
2 parents b0c1d80 + 68e4a11 commit 84cd398

File tree

19 files changed

+3159
-1500
lines changed

19 files changed

+3159
-1500
lines changed

.github/workflows/create.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
tag:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@master
10+
- uses: actions/checkout@v2
1111
- name: WordPress Plugin Deploy
1212
uses: rtCamp/action-wordpress-org-plugin-deploy@master
1313
env:

README.md

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

148148
## Changelog ##
149149

150+
### 4.6.5 [November 23, 2020] ###
151+
152+
* FIXED
153+
154+
* Javascript errors while editing rtMedia image
155+
* UI/UX issues
156+
* Issue with attachment when creating support ticket
157+
* Media not appearing in Profile/Group when uploading from BuddyPress’ sitewide activity stream
158+
150159
### 4.6.4 [July 16, 2020] ###
151160

152161
* Enhancement

app/assets/admin/js/admin.min.js

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/admin/js/settings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ jQuery( document ).ready( function ( $ ) {
10091009

10101010
if ( typeof data.error === 'undefined' ) {
10111011

1012+
data = JSON.parse( data );
10121013
if ( data.exceed_size_msg ) {
10131014
jQuery( '#debuglog' ).val( '' );
10141015
alert( data.exceed_size_msg );

app/assets/js/rtMedia.backbone.js

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,31 @@ jQuery( function( $ ) {
4646

4747
imageEdit.save( $media_id, $nonce );
4848
} );
49+
50+
/**
51+
* Reload page when rtmedia_update type of activity is edited.
52+
*/
53+
function filterBeaSaveSuccess() {
54+
location.reload();
55+
}
56+
/**
57+
* Prefilters ajax call which saves edited activity content.
58+
* Needed with BuddyPress Edit Activity plugin.
59+
* https://wordpress.org/plugins/buddypress-edit-activity/
60+
*/
61+
$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
62+
if ( 'undefined' === typeof originalOptions || 'undefined' === typeof originalOptions.data || 'buddypress-edit-activity-save' !== originalOptions.data.action ) {
63+
return;
64+
}
65+
66+
if ( ! $( '#activity-' + originalOptions.data.activity_id ).hasClass( 'rtmedia_update' ) ) {
67+
return;
68+
}
69+
70+
// Change the callback function to our own function, which reloads the page.
71+
originalOptions.success = filterBeaSaveSuccess;
72+
options.success = filterBeaSaveSuccess;
73+
} );
4974
});
5075
/**
5176
* End of issue 1059 fix
@@ -1443,16 +1468,29 @@ jQuery( document ).ready( function( $ ) {
14431468
var object = '';
14441469
var item_id = 0;
14451470

1446-
if ( jQuery( '#whats-new-post-in' ).length ) {
1447-
item_id = jQuery( '#whats-new-post-in' ).val();
1448-
} else if ( jQuery( '.groups-header' ).length ) {
1449-
item_id = jQuery( '.groups-header' ).attr( 'data-bp-item-id' );
1450-
}
1471+
if ( 'legacy' === bp_template_pack ) {
1472+
if ( jQuery( '#whats-new-post-in' ).length ) {
1473+
item_id = jQuery( '#whats-new-post-in' ).val();
1474+
} else if ( jQuery( '.groups-header' ).length ) {
1475+
item_id = jQuery( '.groups-header' ).attr( 'data-bp-item-id' );
1476+
}
14511477

1452-
if ( item_id > 0 ) {
1453-
object = 'group';
1478+
if ( item_id > 0 ) {
1479+
object = 'group';
1480+
} else {
1481+
object = 'profile';
1482+
}
14541483
} else {
1455-
object = 'profile';
1484+
var whatsNewPostIn = jQuery( '#whats-new-post-in' );
1485+
if ( whatsNewPostIn.length ) {
1486+
object = whatsNewPostIn.val();
1487+
item_id = 0;
1488+
}
1489+
1490+
var contextData = jQuery( '#whats-new-post-in-box-items li.bp-activity-object.selected input[type="hidden"]' );
1491+
if ( contextData.length ) {
1492+
item_id = contextData.val();
1493+
}
14561494
}
14571495

14581496
up.settings.multipart_params.context = object;

app/helper/RTMediaSupport.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,12 @@ public function get_form( $form = '' ) {
563563
<input type="hidden" name="ip_address" value="<?php echo esc_attr( $remote_addr ); ?>"/>
564564
<input type="hidden" name="server_type" value="<?php echo esc_attr( $server_software ); ?>"/>
565565
<input type="hidden" name="user_agent" value="<?php echo esc_attr( $http_user_agent ); ?>"/>
566+
567+
<?php
568+
// Adding nonce for file upload.
569+
$nonce = wp_create_nonce( 'rtmedia-admin-upload' );
570+
?>
571+
<input type="hidden" id="rtmedia_admin_upload_nonce" value="<?php echo esc_attr( $nonce ); ?>" />
566572
<input type="hidden" name="debuglog_temp_path" id="debuglog_temp_path" />
567573
</div>
568574

app/main/controllers/activity/RTMediaBuddyPressActivity.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public function __construct() {
3434
// Code to show media with read more option.
3535
add_filter( 'bp_activity_truncate_entry', array( $this, 'bp_activity_truncate_entry' ), 10, 3 );
3636
}
37+
38+
add_filter( 'b_e_a_plugin_option_editable_types', array( $this, 'rtmedia_bea_plugin_option_editable_types' ) );
3739
}
3840
add_action( 'bp_activity_comment_posted', array( $this, 'comment_sync' ), 10, 2 );
3941
add_action( 'bp_activity_delete_comment', array( $this, 'delete_comment_sync' ), 10, 2 );
@@ -76,6 +78,25 @@ public function __construct() {
7678
}
7779
}
7880

81+
/**
82+
* Adds rtmedia_update in editable activity types when BuddyPress Edit Activity plugin is active.
83+
*
84+
* @param array $option Editable activity types.
85+
*
86+
* @return array Modified editable activity types.
87+
*/
88+
public function rtmedia_bea_plugin_option_editable_types( $option ) {
89+
if ( empty( $option ) || ! is_array( $option ) ) {
90+
$option = array();
91+
}
92+
93+
if ( ! in_array( 'rtmedia_update', $option, true ) ) {
94+
$option[] = 'rtmedia_update';
95+
}
96+
97+
return $option;
98+
}
99+
79100
/**
80101
* Show media even if the text is long with read more option.
81102
*

app/main/controllers/template/RTMediaTemplate.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ public function enqueue_image_editor_scripts() {
6363
'rtmedia-image-edit',
6464
admin_url( 'js/image-edit.js' ),
6565
array(
66+
'wp-i18n',
6667
'jquery',
6768
'json2',
6869
'imgareaselect',
6970
),
7071
RTMEDIA_VERSION,
7172
1
7273
);
74+
wp_add_inline_script( 'rtmedia-image-edit', 'window.imageEdit.focusManager=function(){return;}' );
7375
wp_enqueue_style( 'rtmedia-image-area-select', includes_url( '/js/imgareaselect/imgareaselect.css' ), array(), RTMEDIA_VERSION );
7476
wp_enqueue_style( 'rtmedia-image-edit', admin_url( 'css/media.css' ), array(), RTMEDIA_VERSION );
7577
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function rtmedia_admin_pages_content( $page ) {
518518
<li><?php esc_html_e( 'WordPress/BuddyPress Plugin Development', 'buddypress-media' ); ?></li>
519519
</ol>
520520
<div class="clearfix">
521-
<a href="https://rtmedia.io/enterprise-plan" class="rtm-button rtm-success" target="_blank"><?php esc_html_e( 'Contact Us', 'buddypress-media' ); ?></a>
521+
<a href="https://rtmedia.io/enterprise-plan" class="button button-primary button-big" target="_blank"><?php esc_html_e( 'Contact Us', 'buddypress-media' ); ?></a>
522522
</div>
523523
</div>
524524
<?php

bin/.travis.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,23 @@ before_script:
3232
- sudo apt-get autoremove
3333
- sudo apt-get autoclean
3434
- sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = [email protected]" > /home/travis/.gitconfig'
35-
- wget -qO ee rt.cx/ee && sudo bash ee
36-
- sudo ee stack install --nginx
37-
- sudo ee stack install --web
35+
- wget -qO wo wops.cc && sudo bash wo
36+
- sudo wo stack install --nginx
37+
- sudo wo stack install --web
38+
- sudo rm /etc/nginx/conf.d/stub_status.conf /etc/nginx/sites-enabled/22222
39+
- sudo wo stack restart --nginx
3840
- sudo wp --yes --allow-root cli update --nightly
39-
- sudo ee site create automation.rtmedia.me --wp --user=ADMINUSER [email protected] --pass=ADMINPASS
41+
- sudo wo site create automation.rtmedia.me --wp --user=ADMINUSER [email protected] --pass=ADMINPASS
4042
- sudo sed -i '/^127.0.0.1/ s/$/ automation.rtmedia.me/' /etc/hosts
41-
- sudo chmod 777 -R /var/www
43+
- sudo chown -R $USER:www-data /var/www/automation.rtmedia.me
44+
- sudo chmod -R g+s /var/www/automation.rtmedia.me
45+
- sudo chmod -R o-rwx /var/www/automation.rtmedia.me
4246
- cd /var/www/automation.rtmedia.me/htdocs/wp-content/plugins/ && mkdir rtMedia
4347
- cd $PLUGIN_DIR
4448
- cp -Rf * /var/www/automation.rtmedia.me/htdocs/wp-content/plugins/rtMedia/
4549
- cd /var/www/automation.rtmedia.me/htdocs/
46-
- wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.5.1.2.zip
50+
- curl -I http://automation.rtmedia.me
51+
- wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.6.3.0.zip
4752
- wp plugin activate --all
4853
- wp theme activate twentynineteen
4954
- cd $PLUGIN_DIR
@@ -81,8 +86,8 @@ script:
8186
- codecept run acceptance --steps
8287

8388
after_script:
84-
- sudo cat /var/log/ee/ee.log
89+
#- sudo cat /var/log/ee/ee.log
8590

8691
#notifications:
8792
# slack:
88-
# secure: E9tbxOZ/n4Gcwi8SiCKQ5QVw+5AfwdTq4e/VG4epQF74IqXmJJvaJgQSVKLSVXJm4O1u8JHd+ffN1Xheh1FDaKkscuJYQcT4D+oOc40bHhb0tS71v1fAMzMX7NuyqgEu2a8dbYo7bqVKtdj/EBbOPWnwgfMuA6ylTItVf294spA=
93+
# secure: E9tbxOZ/n4Gcwi8SiCKQ5QVw+5AfwdTq4e/VG4epQF74IqXmJJvaJgQSVKLSVXJm4O1u8JHd+ffN1Xheh1FDaKkscuJYQcT4D+oOc40bHhb0tS71v1fAMzMX7NuyqgEu2a8dbYo7bqVKtdj/EBbOPWnwgfMuA6ylTItVf294spA=

0 commit comments

Comments
 (0)