I’ve been playing a little with the comments options so every field in my template has “onfocus” and “onblur” variables and I’ve encountered some problems. I solved most of them but I still have a problem when people don’t fill up the comment itself.
In wp-comments-posts.php I modified something to be like this:
if ( '' == $comment_content || 'Ingrese su comentario aquí...' == $comment_content || 'Ingrese su comentario aquí...' == $comment_content ) {
wp_die( __('Error: please type a comment.') );
}
As you can see, my site is in Spanish. I did the same thing with the website field but it worked just fine… ok, it doesn’t have any special characters like the example above:
if ( 'Sitio Web (Opcional)' == $comment_author_url ) {
$comment_author_url = '';
}
Am I using the OR (||) statement in a wrong way? What can it be?
Thanks in advance. Any tip will be appreciated 😉
The topic ‘if comment has no test in it’ is closed to new replies.
(@caracena)
16 years, 8 months ago
Hi all,
I’ve been playing a little with the comments options so every field in my template has “onfocus” and “onblur” variables and I’ve encountered some problems. I solved most of them but I still have a problem when people don’t fill up the comment itself.
In wp-comments-posts.php I modified something to be like this:
As you can see, my site is in Spanish. I did the same thing with the website field but it worked just fine… ok, it doesn’t have any special characters like the example above:
Am I using the OR (||) statement in a wrong way? What can it be?
Thanks in advance. Any tip will be appreciated 😉