Find and comment this code in plugin.php
add_action('comment_form', 'commentimage_comment_form', 99);
function commentimage_comment_form()
{
//if (!is_single() && !is_page()) return;
if (!is_singular()) {
return;
}
$options = get_option('commentimage');
if ($options['field'] == 0)
{
$images = $options['images'];
if (!isset($images) || !is_numeric($images)) $images = 1;
for ($i=0; $i<$images; $i++)
{
echo '<p style="clear: both"><input style="width: auto" type="file" name="image' . ($i==0?'':$i) .'"/> ' . htmlspecialchars($options['label']) . '</p>';
}
}
}
and add this code:
function add_comment_fields($fields) {
//if (!is_single() && !is_page()) return;
if (!is_singular()) {
return;
}
$options = get_option('commentimage');
if ($options['field'] == 0)
{
$images = $options['images'];
if (!isset($images) || !is_numeric($images)) $images = 1;
for ($i=0; $i<$images; $i++)
{
echo '<p style="clear: both"><input style="width: auto" type="file" name="image' . ($i==0?'':$i) .'"/> ' . htmlspecialchars($options['label']) . '</p>';
}
}
return $fields;
}
add_filter('comment_form_default_fields','add_comment_fields');