Tagged: bp-force-profile-photo
Hi,
thanks for the great plugin. I am using BP Force Profile Photo on my dating site and it works well ( not letting users to use any aspect of the site before uploading a photo ). The only problem is, that once the user upload the photo, the message “Please upload your profile photo to start using this site” remains until the user refresh the site or visit other parts of the site. It is unfortunately very confusing as the user might think, that it didn’t work and that they still can’t use the site even though they have uploaded the photo. Is there a way we can get this message to disappear straight after the photo is uploaded withouth the need of manually refreshing the site?
Thanks a lot!Hi Petra,
Thank You for posting. Please use the following code in your current theme ‘functions.php’
function buddydev_remove_upload_avatar_error_message() { if( ! function_exists( 'buddypress' ) || ! bp_is_user_change_avatar() ) { return ; } ?> <script type="text/javascript"> jQuery(document).ready( function() { if( typeof bp == 'undefined' || typeof bp.Avatar =='undefined' ) { return; } bp.Avatar.Attachment.on("change:url", function (data) { jQuery("#message").remove(); }); }); </script> <?php } add_action( 'wp_footer', 'buddydev_remove_upload_avatar_error_message' );
Let me know. If it works or not.
Thank You
Ravi
You must be logged in to reply to this topic.