Without email validation for anonymous user?
I wanted change template-functions.php (I found information about this in older post – delete line 111,112 in template-functions.php) Unfortunately I don’t have this file in my version DWQ&A 1.4.5.
What can I do? This very important for me.
Thanks!
PS
I need this because plugin is amazing!
Hi,
You can go to wp-content/plugins/dw-question-answer/inc/Handle.php
then remove the code from line 298 to 398
if ( !is_user_logged_in() ) { if ( empty( $_POST['_dwqa_anonymous_email'] ) || !is_email( sanitize_email( $_POST['_dwqa_anonymous_email'] ) ) ) { dwqa_add_notice( __( 'Missing email information', 'dwqa' ), 'error' ); return false; } if ( empty( $_POST['_dwqa_anonymous_name'] ) ) { dwqa_add_notice( __( 'Missing name information', 'dwqa' ), 'error' ); return false; } }
Thanks Kevin! I removed the code from line 298 to 308:) but when I add answer as anonymous user I still have to entering email;/
In case add new question – it’s working fine.
Thanks for Your patience
Hi,
You can remove the code from line 49 to 55 in the file Handle.php
if ( !is_user_logged_in() && ( empty( $_POST['user-email'] ) || !is_email( sanitize_email( $_POST['user-email'] ) ) ) ) { dwqa_add_notice( __( 'Missing email information', 'dwqa' ), 'error' ); } if ( !is_user_logged_in() && ( empty( $_POST['user-name'] ) ) ) { dwqa_add_notice( __( 'Missing name information', 'dwqa' ), 'error' ); }
I owe you one Kevin.
Thanks for your help
Best Regards
Please login or Register to submit your answer