I made a few comment meta field and they work well.
Now I need to set comment text as no require.
I found this solution but don't work for me.
add_action( 'pre_comment_on_post', 'allow_empty_comment_text' );
function allow_empty_comment_text( $text = '' )
{
if ( ! isset ( $_POST['comment'] ) or '' === trim( $_POST['comment'] ) )
{
$img = '/* Process uploaded image here, create an <img> tag. */'
$_POST['comment'] = '<img>'; // use a real img tag here
}
}
any solution please.