-
Notifications
You must be signed in to change notification settings - Fork 112
fix error on media comment while activity stream is disabled #1028 #1030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thrijith Do minor change
app/admin/RTMediaFormHandler.php
Outdated
if ( ! bp_is_active( 'activity' ) ) { | ||
?> | ||
<script> | ||
jQuery( '#rtmedia-bp-enable-activity' ).prop( "disabled", true ).next().css( 'background', 'grey' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use hexcode instead of grey
.
app/admin/RTMediaFormHandler.php
Outdated
jQuery( '#rtmedia-bp-enable-activity' ).prop( "disabled", true ).next().css( 'background-color', '#808080' ); | ||
jQuery( '#rtmedia-activity-feed-limit' ).prop( "disabled", true ); | ||
jQuery( '#rtmedia-enable-like-activity' ).prop( "disabled", true ).next().css( 'background-color', '#808080' ); | ||
jQuery( '#rtmedia-enable-comment-activity' ).prop( "disabled", true ).next().css( 'background-color', '#808080' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make this one lined
jQuery( '#rtmedia-bp-enable-activity, #rtmedia-enable-like-activity, #rtmedia-enable-comment-activity' ).prop( "disabled", true ).next().css( 'background-color', '#808080' );
Sorry for not pointing out in previous review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
if BuddyPress User Groups is disabled
app/admin/RTMediaFormHandler.php
Outdated
$render_options['rtmedia-activity-feed-limit']['args']['desc'] = | ||
$render_options['rtmedia-enable-like-activity']['args']['desc'] = | ||
$render_options['rtmedia-enable-comment-activity']['args']['desc'] = | ||
'Please Enable BuddyPress Activity Streams to update option'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this translatable
app/admin/RTMediaFormHandler.php
Outdated
$render_options = apply_filters( 'rtmedia_album_control_setting', $render_options, $rtmedia->options ); | ||
if ( ! bp_is_active( 'groups' ) ) { | ||
$render_options['rtmedia-enable-on-group']['args']['desc'] = | ||
'Please Enable BuddyPress User Groups to update option'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this translatable
This reverts commit 31e116b.
Fix Travis Build Fail for PR #1030
fix fatal error on media comment while activity stream is disabled #1028
when activity stream is disabled
bp_activity_add
andbp_activity_delete
will not work so added condition to check if the function is available to solve the fatal error.