Skip to content

Commit

Permalink
Merge pull request #1708 from rtCamp/develop
Browse files Browse the repository at this point in the history
Version update v4.6.5
  • Loading branch information
pooja-muchandikar authored Nov 23, 2020
2 parents b0c1d80 + 68e4a11 commit 84cd398
Show file tree
Hide file tree
Showing 19 changed files with 3,159 additions and 1,500 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: WordPress Plugin Deploy
uses: rtCamp/action-wordpress-org-plugin-deploy@master
env:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ https://www.youtube.com/watch?v=dJrykKQGDcs

## Changelog ##

### 4.6.5 [November 23, 2020] ###

* FIXED

* Javascript errors while editing rtMedia image
* UI/UX issues
* Issue with attachment when creating support ticket
* Media not appearing in Profile/Group when uploading from BuddyPress’ sitewide activity stream

### 4.6.4 [July 16, 2020] ###

* Enhancement
Expand Down
2 changes: 1 addition & 1 deletion app/assets/admin/js/admin.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/assets/admin/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@ jQuery( document ).ready( function ( $ ) {

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

data = JSON.parse( data );
if ( data.exceed_size_msg ) {
jQuery( '#debuglog' ).val( '' );
alert( data.exceed_size_msg );
Expand Down
54 changes: 46 additions & 8 deletions app/assets/js/rtMedia.backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,31 @@ jQuery( function( $ ) {

imageEdit.save( $media_id, $nonce );
} );

/**
* Reload page when rtmedia_update type of activity is edited.
*/
function filterBeaSaveSuccess() {
location.reload();
}
/**
* Prefilters ajax call which saves edited activity content.
* Needed with BuddyPress Edit Activity plugin.
* https://wordpress.org/plugins/buddypress-edit-activity/
*/
$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
if ( 'undefined' === typeof originalOptions || 'undefined' === typeof originalOptions.data || 'buddypress-edit-activity-save' !== originalOptions.data.action ) {
return;
}

if ( ! $( '#activity-' + originalOptions.data.activity_id ).hasClass( 'rtmedia_update' ) ) {
return;
}

// Change the callback function to our own function, which reloads the page.
originalOptions.success = filterBeaSaveSuccess;
options.success = filterBeaSaveSuccess;
} );
});
/**
* End of issue 1059 fix
Expand Down Expand Up @@ -1443,16 +1468,29 @@ jQuery( document ).ready( function( $ ) {
var object = '';
var item_id = 0;

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 ( '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 ( item_id > 0 ) {
object = 'group';
if ( item_id > 0 ) {
object = 'group';
} else {
object = 'profile';
}
} else {
object = 'profile';
var whatsNewPostIn = jQuery( '#whats-new-post-in' );
if ( whatsNewPostIn.length ) {
object = whatsNewPostIn.val();
item_id = 0;
}

var contextData = jQuery( '#whats-new-post-in-box-items li.bp-activity-object.selected input[type="hidden"]' );
if ( contextData.length ) {
item_id = contextData.val();
}
}

up.settings.multipart_params.context = object;
Expand Down
6 changes: 6 additions & 0 deletions app/helper/RTMediaSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,12 @@ public function get_form( $form = '' ) {
<input type="hidden" name="ip_address" value="<?php echo esc_attr( $remote_addr ); ?>"/>
<input type="hidden" name="server_type" value="<?php echo esc_attr( $server_software ); ?>"/>
<input type="hidden" name="user_agent" value="<?php echo esc_attr( $http_user_agent ); ?>"/>

<?php
// Adding nonce for file upload.
$nonce = wp_create_nonce( 'rtmedia-admin-upload' );
?>
<input type="hidden" id="rtmedia_admin_upload_nonce" value="<?php echo esc_attr( $nonce ); ?>" />
<input type="hidden" name="debuglog_temp_path" id="debuglog_temp_path" />
</div>

Expand Down
21 changes: 21 additions & 0 deletions app/main/controllers/activity/RTMediaBuddyPressActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public function __construct() {
// Code to show media with read more option.
add_filter( 'bp_activity_truncate_entry', array( $this, 'bp_activity_truncate_entry' ), 10, 3 );
}

add_filter( 'b_e_a_plugin_option_editable_types', array( $this, 'rtmedia_bea_plugin_option_editable_types' ) );
}
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 );
Expand Down Expand Up @@ -76,6 +78,25 @@ public function __construct() {
}
}

/**
* Adds rtmedia_update in editable activity types when BuddyPress Edit Activity plugin is active.
*
* @param array $option Editable activity types.
*
* @return array Modified editable activity types.
*/
public function rtmedia_bea_plugin_option_editable_types( $option ) {
if ( empty( $option ) || ! is_array( $option ) ) {
$option = array();
}

if ( ! in_array( 'rtmedia_update', $option, true ) ) {
$option[] = 'rtmedia_update';
}

return $option;
}

/**
* Show media even if the text is long with read more option.
*
Expand Down
2 changes: 2 additions & 0 deletions app/main/controllers/template/RTMediaTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ public function enqueue_image_editor_scripts() {
'rtmedia-image-edit',
admin_url( 'js/image-edit.js' ),
array(
'wp-i18n',
'jquery',
'json2',
'imgareaselect',
),
RTMEDIA_VERSION,
1
);
wp_add_inline_script( 'rtmedia-image-edit', 'window.imageEdit.focusManager=function(){return;}' );
wp_enqueue_style( 'rtmedia-image-area-select', includes_url( '/js/imgareaselect/imgareaselect.css' ), array(), RTMEDIA_VERSION );
wp_enqueue_style( 'rtmedia-image-edit', admin_url( 'css/media.css' ), array(), RTMEDIA_VERSION );
}
Expand Down
2 changes: 1 addition & 1 deletion app/main/controllers/template/rtmedia-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ function rtmedia_admin_pages_content( $page ) {
<li><?php esc_html_e( 'WordPress/BuddyPress Plugin Development', 'buddypress-media' ); ?></li>
</ol>
<div class="clearfix">
<a href="https://rtmedia.io/enterprise-plan" class="rtm-button rtm-success" target="_blank"><?php esc_html_e( 'Contact Us', 'buddypress-media' ); ?></a>
<a href="https://rtmedia.io/enterprise-plan" class="button button-primary button-big" target="_blank"><?php esc_html_e( 'Contact Us', 'buddypress-media' ); ?></a>
</div>
</div>
<?php
Expand Down
21 changes: 13 additions & 8 deletions bin/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,23 @@ before_script:
- sudo apt-get autoremove
- sudo apt-get autoclean
- sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = [email protected]" > /home/travis/.gitconfig'
- wget -qO ee rt.cx/ee && sudo bash ee
- sudo ee stack install --nginx
- sudo ee stack install --web
- wget -qO wo wops.cc && sudo bash wo
- sudo wo stack install --nginx
- sudo wo stack install --web
- sudo rm /etc/nginx/conf.d/stub_status.conf /etc/nginx/sites-enabled/22222
- sudo wo stack restart --nginx
- sudo wp --yes --allow-root cli update --nightly
- sudo ee site create automation.rtmedia.me --wp --user=ADMINUSER [email protected] --pass=ADMINPASS
- sudo wo site create automation.rtmedia.me --wp --user=ADMINUSER [email protected] --pass=ADMINPASS
- sudo sed -i '/^127.0.0.1/ s/$/ automation.rtmedia.me/' /etc/hosts
- sudo chmod 777 -R /var/www
- sudo chown -R $USER:www-data /var/www/automation.rtmedia.me
- sudo chmod -R g+s /var/www/automation.rtmedia.me
- sudo chmod -R o-rwx /var/www/automation.rtmedia.me
- cd /var/www/automation.rtmedia.me/htdocs/wp-content/plugins/ && mkdir rtMedia
- cd $PLUGIN_DIR
- cp -Rf * /var/www/automation.rtmedia.me/htdocs/wp-content/plugins/rtMedia/
- cd /var/www/automation.rtmedia.me/htdocs/
- wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.5.1.2.zip
- curl -I http://automation.rtmedia.me
- wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.6.3.0.zip
- wp plugin activate --all
- wp theme activate twentynineteen
- cd $PLUGIN_DIR
Expand Down Expand Up @@ -81,8 +86,8 @@ script:
- codecept run acceptance --steps

after_script:
- sudo cat /var/log/ee/ee.log
#- sudo cat /var/log/ee/ee.log

#notifications:
# slack:
# secure: E9tbxOZ/n4Gcwi8SiCKQ5QVw+5AfwdTq4e/VG4epQF74IqXmJJvaJgQSVKLSVXJm4O1u8JHd+ffN1Xheh1FDaKkscuJYQcT4D+oOc40bHhb0tS71v1fAMzMX7NuyqgEu2a8dbYo7bqVKtdj/EBbOPWnwgfMuA6ylTItVf294spA=
# secure: E9tbxOZ/n4Gcwi8SiCKQ5QVw+5AfwdTq4e/VG4epQF74IqXmJJvaJgQSVKLSVXJm4O1u8JHd+ffN1Xheh1FDaKkscuJYQcT4D+oOc40bHhb0tS71v1fAMzMX7NuyqgEu2a8dbYo7bqVKtdj/EBbOPWnwgfMuA6ylTItVf294spA=
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.4
Version: 4.6.5
Author: rtCamp
Text Domain: buddypress-media
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
Expand All @@ -21,7 +21,7 @@
/**
* The version of the plugin
*/
define( 'RTMEDIA_VERSION', '4.6.4' );
define( 'RTMEDIA_VERSION', '4.6.5' );
}

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

0 comments on commit 84cd398

Please sign in to comment.