|
Server IP : 10.131.40.8 / Your IP : 216.73.216.15 Web Server : Apache System : Linux webd008.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : ludmqhh ( 137773) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/ludmqhh/www/provence-plomberie/../hotel-forum/wp-content/themes/hotello/inc/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/*Single Comment view*/
if (!function_exists('hotello_comment')) {
function hotello_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ('div' == $args['style']) {
$tag = 'div';
$add_below = 'comment';
} else {
$tag = 'li';
$add_below = 'div-comment';
}
?>
<<?php echo esc_attr($tag) ?> <?php comment_class(empty($args['has_children']) ? '' : 'parent') ?> id="comment-<?php comment_ID() ?>">
<?php if ('div' != $args['style']) { ?>
<div id="div-comment-<?php comment_ID() ?>" class="comment-body clearfix">
<?php } ?>
<?php if ($args['avatar_size'] != 0) { ?>
<div class="vcard">
<?php echo get_avatar($comment, 174); ?>
</div>
<?php } ?>
<div class="comment-info clearfix">
<div class="comment-author"><?php echo get_comment_author_link(); ?></div>
<div class="comment-meta commentmetadata">
<a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?>">
<?php printf(esc_html__('%1$s at %2$s', 'hotello'), get_comment_date(), get_comment_time()); ?>
</a>
<?php comment_reply_link(array_merge($args, array('reply_text' => '<i class="fa fa-reply"></i>' . esc_html__('Reply', 'hotello'), 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
<?php edit_comment_link(esc_html__('Edit', 'hotello'), ' ', ''); ?>
</div>
<div class="comment-text">
<?php comment_text(); ?>
</div>
<?php if ($comment->comment_approved == '0') { ?>
<em class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.', 'hotello'); ?></em>
<?php } ?>
</div>
<?php if ('div' != $args['style']) { ?>
</div>
<?php } ?>
<?php
}
}
add_filter('comment_form_default_fields', 'hotello_comment_form_fields');
function hotello_comment_form_fields($fields)
{
$commenter = wp_get_current_commenter();
$req = get_option('require_name_email');
$aria_req = ($req ? " aria-required='true'" : '');
$html5 = current_theme_supports('html5', 'comment-form') ? 1 : 0;
$fields = array(
'author' => '<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="form-group comment-form-author">
<input placeholder="' . esc_attr__('Name', 'hotello') . ($req ? ' *' : '') . '" class="form-control" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' />
</div>
</div>',
'email' => '<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="form-group comment-form-email">
<input placeholder="' . esc_attr__('E-mail', 'hotello') . ($req ? ' *' : '') . '" class="form-control" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' />
</div>
</div></div>',
);
return $fields;
}
add_filter('comment_form_defaults', 'hotello_comment_form');
function hotello_comment_form($args)
{
$args['comment_field'] = '<div class="form-group comment-form-comment">
<textarea placeholder="' . esc_attr_x('Message', 'noun', 'hotello') . ' *" class="form-control" name="comment" rows="4" aria-required="true"></textarea>
</div>';
$args['submit_button'] = '<button name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s">%4$s</button>';
return $args;
}