Replies
- Ravi on March 16, 2022 at 6:31 am in reply to: [Resolved] Predefined user gallery with display name #43833
Hello Jacob,
Welcome to the BuddyDev Forums.
For creating a gallery with the title as the user display name. Replace the following string:
__( 'Predefined Photo Gallery' )
with
bp_core_get_user_displayname( $user_id )
Note: Please make sure comma(,) remain there
And to restrict form edit gallery title use the following code:
add_action( 'mpp_user_can_edit_gallery', function ( $can, $gallery, $user_id ) { // Do not check if not allowed to edit gallery details. if ( ! $can || $gallery->user_id != $user_id ) { return $can; } // Do not allow to change the title. if ( ! empty( $_POST['mpp-gallery-title'] ) && $gallery->title != $_POST['mpp-gallery-title'] ) { $can = false; } return $can; } );
Image from other sources you can use ‘mpp_add_media’ function to add to gallery please have a look at the function supported args.
Regards
Ravi - Ravi on March 16, 2022 at 5:57 am in reply to: [Resolved] BuddyPress Editable Activity removing link previews #43832
Hello Arlo,
Thank you for the acknowledgement. I have checked BuddyBoss edit activity functionality on my local server and it is working fine for me. Please have a look at the console window of your browser is there any error is showing or not. There might be a chance that some error is breaking the edit button behaviour.
Regards
Ravi - Ravi on March 16, 2022 at 5:53 am in reply to: [Resolved] How to get opposite member type with common items selected? #43831
Hello Anjan,
Thank you for the acknowledgement. Yup, The Xprofile query is slow for the large data set. Can you please share the complete code so that I can give a better review?
Regards
Ravi Hello Abhist,
Thank you for posting. Please use the following code:
add_action( 'bp_set_member_type', function ( $user_id, $member_type ) { // $user_id ID of the user whose member type has been updated. // $member_type The member type name or an array of member type names. $user = get_user_by( 'id', $user_id ); if ( ! $user ) { return; } // Provide the email subject. $subject = ''; // Provide the email message. $message = ''; @wp_mail( $user->user_email, $subject, $message ); } );
Please check and let me know if it helps or not.
Regards
Ravi- Ravi on March 15, 2022 at 5:54 am in reply to: [Resolved] BuddyPress Editable Activity removing link previews #43819
Hello Arlo,
Welcome to the BuddyDev Forums.
With BuddyBoss you do not need BuddyPress Editable Activity plugin as it does offer this functionality in the core. You can enable it from BuddyBoss > Settings > Activity > Edit Activity
Please check
Regards
Ravi - Ravi on March 15, 2022 at 5:46 am in reply to: [Resolved] Featured Members plugin not showing in Users profiles for Admin #43818
Hello Eric,
Thank you for the acknowledgement. I am glad that I could help.
We will update the plugin documentation in the next version.
Regards
Ravi - Ravi on March 14, 2022 at 11:57 am in reply to: [Resolved] How To Disable New User Notifications in WordPress admins #43813
Thank you for the acknowledgement.
Regards
Ravi - Ravi on March 14, 2022 at 8:28 am in reply to: [Resolved] How to get opposite member type with common items selected? #43810
Hello Anjan,
Thank you for sharing the code. No need to add the ‘relation’ key to the Xprofile query.
$args = array( 'member_type' => 'donor', 'xprofile_query' => array( array( 'field_id' => $fieldID, 'value' => $arrayItems, 'compare' => 'IN', ), ), );
You can directly pass this args to the member query. There is no need to create a User_Query instance. Modify the filter_args method from the above mention blog code.
Regards
Ravi- This reply was modified 3 years, 4 months ago by
Ravi.
- This reply was modified 3 years, 4 months ago by
- Ravi on March 14, 2022 at 8:24 am in reply to: [Resolved] How To Disable New User Notifications in WordPress admins #43809
Hello Tosin,
Thank you for sharing. try the following code:
add_filter( 'bp_core_send_user_registration_admin_notification', '__return_false' );
Let me know if it helps or not.
Regards
Ravi - Ravi on March 14, 2022 at 7:07 am in reply to: [Resolved] How to get opposite member type with common items selected? #43806
Hello Anjan,
Please have a look at the “BP_Xprofile_Queury” class. They have mentioned in the doc comment all supported args.
You will have a better idea to use this. Please let me know if you need further assistance.
Regards
Ravi