Hi π I’ve just done the following modifications:
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
/wp-content/plugins/wp-comment-fields/classes/plugin.class.php
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
– replace this code (line 539):
if($comment_meta){
$comment_meta_heading = 'Comment meta'; //should be get by option
$comment .= '<p><strong>'.sprintf(__('%s'), $comment_meta_heading).'</strong></p>';
foreach ($comment_meta as $index => $meta){
$comment_meta_key = $meta['data_name'];
$comment_meta_val = get_comment_meta(get_comment_ID(), $comment_meta_key, true);
if($comment_meta_val != ''){
$comment .= sprintf(__('%s: '), esc_attr($meta['title']));
$comment .= '<i>'.sprintf(__('%s'), esc_attr($comment_meta_val)).'</i>';
$comment .= ', ';
}
}
$comment = substr($comment, 0, -2);
}
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
– with this:
if($comment_meta){
//$comment_meta_heading = 'Comment meta'; //should be get by option
//$comment .= '<p><strong>'.sprintf(__('%s'), $comment_meta_heading).'</strong></p>';
foreach ($comment_meta as $index => $meta){
$comment_meta_key = $meta['data_name'];
$comment_meta_val = get_comment_meta(get_comment_ID(), $comment_meta_key, true);
if($comment_meta_val != ''){
$comment .= '<p class="meta-comment-content"><span class="title">'.sprintf(__('%s: '), esc_attr($meta['title'])).'</span>';
$comment .= '<span class="detail">'.sprintf(__('%s'), esc_attr($comment_meta_val)).'</span></p>';
//$comment .= ', ';
}
}
//$comment = substr($comment, 0, -2);
}
return $comment;
}
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
CSS Code:
p.meta-comment-content{margin-bottom:10px;}
p.meta-comment-content span.title{font-weight:bold;}
@media screen and (min-width: 800px)
{
//classes of input boxes
{width:45%; float:left; padding-right:40px;}
#respond form input[type="text"],
#respond form select,
textarea#comment{width:90%!important;}
}
@media screen and (max-width: 560px)
{
form#commentform.comment-form select,
p.form-submit input[type="submit"]{width:100%;}
}