/** * Comment form renderer function. * * @return void */ function adventure_tours_comment_form_renderer() { $commenter = wp_get_current_commenter(); $fields = array('author' => '<div class="row"><div class="col-sm-4">' . '<label for="author">' . esc_html__('Name', 'adventure-tours') . '*</label>' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" />' . '</div>', 'email' => '<div class="col-sm-4">' . '<label for="email">' . esc_html__('Email', 'adventure-tours') . '*</label>' . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" />' . '</div>', 'url' => '<div class="col-sm-4">' . '<label for="url">' . esc_html__('Website', 'adventure-tours') . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" />' . '</div></div>'); $args = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_notes_before' => '', 'comment_notes_after' => '', 'comment_field' => '<label for="comment">' . esc_html__('Comment', 'adventure-tours') . '</label><textarea id="comment" name="comment"></textarea>', 'label_submit' => '', 'cancel_reply_link' => '<i class="fa fa-times"></i>'); ob_start(); comment_form($args); $formHtml = '<div class="comments__form">' . ob_get_clean() . '</div>'; wp_enqueue_script('comment-reply'); echo str_replace('<input name="submit" type="submit" id="submit" class="submit" value="" />', '<button type="submit" class="atbtn"><i class="atbtn__icon fa fa-comment"></i>' . esc_html__('Post Comment', 'adventure-tours') . '</button>', $formHtml); }
public function show_html($atts) { $this->init_sc(); if ('' !== $this->options->get('cgb_clist_in_page_content') && '' !== $this->options->get('cgb_adjust_output')) { // Show comments template in page content ob_start(); include CGB_PATH . 'includes/comments-template.php'; $out = ob_get_contents(); ob_end_clean(); return $out; } else { // Show comment form $out = ''; if (comments_open()) { // Only show one form above the comment list. The form_in_page will not be displayed if form_above_comments and adjust_output is enabled if ('' !== $this->options->get('cgb_form_in_page') && ('' === $this->options->get('cgb_form_above_comments') || '' === $this->options->get('cgb_adjust_output'))) { require_once CGB_PATH . 'includes/comments-functions.php'; ob_start(); comment_form(CGB_Comments_Functions::get_instance()->get_guestbook_comment_form_args()); $out .= ob_get_contents(); ob_end_clean(); } } else { $out .= '<div id="respond" style="text-align:center">' . __('Guestbook is closed', 'comment-guestbook') . '</div>'; } return $out; } }
function thb_comments($form_args = array()) { comments_template('', true); $form_args += array('title_reply' => __('Reply', 'thb_text_domain')); if (comments_open()) { comment_form($form_args); } }
public function API_form() { $_GET['_display'] = $_GET['display']; $_GET['display'] = 'default'; $_GET = iS::escapeStr($_GET); iCMS::hooks('enable_comment', true); iPHP::app('comment.func'); return comment_form($_GET); }
function theme_comment_form() { $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; $fields = array('author' => '<div class="field half-field">' . '<input class="' . ($req ? 'required' : '') . '" ' . ($req ? 'required' : '') . ' type="text" id="author" name="author" placeholder="Nombre" value="' . '" /></div>', 'email' => '<div class="field half-field">' . '<input class="' . ($req ? 'required' : '') . '" ' . ($req ? 'required' : '') . ' type="text" id="email" name="email" placeholder="E-mail" value="' . '" /></div>'); $comment_field = '<div class="field">' . '<textarea class="' . ($req ? 'required' : '') . '" ' . ($req ? 'required' : '') . 'id="comment" name="comment" placeholder="Comentario" ></textarea></div>'; $comment_notes_before = ''; $comment_notes_after = ''; $comments_args = array('fields' => $fields, '$logged_in_as' => $logged_in_as, 'comment_notes_before' => $comment_notes_before, 'comment_notes_after' => $comment_notes_after, 'comment_field' => $comment_field, 'title_reply' => 'Publicar comentario', 'label_submit' => 'Enviar'); comment_form($comments_args); }
public static function comment_form($args = array()) { $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); $required_attr = 'aria-required="true" required'; $required_indicator = ' <span class="required">*</span>'; $args['fields'] = array('author' => '<div class="comment-form-author form-group row"><label class="control-label col-sm-3" for="author">' . __('Name', 'wp-starter-theme') . ($req ? $required_indicator : '') . '</label><div class="col-sm-9"><input type="text" id="author" name="author" class="form-control" value="' . esc_attr($commenter['comment_author']) . '"' . ($req ? $required_attr : '') . '></div></div>', 'email' => '<div class="comment-form-email form-group row"><label class="control-label col-sm-3" for="email">' . __('Email', 'wp-starter-theme') . ($req ? $required_indicator : '') . '</label><div class="col-sm-9"><input type="email" id="email" name="email" class="form-control" value="' . esc_attr($commenter['comment_author_email']) . '"' . ($req ? $required_attr : '') . '></div></div>', 'url' => '<div class="comment-form-url form-group row"><label class="control-label col-sm-3" for="url">' . __('Website', 'wp-starter-theme') . '</label><div class="col-sm-9"><input type="url" id="url" name="url" class="form-control" value="' . esc_attr($commenter['comment_author_url']) . '"></div></div>'); $args['comment_field'] = '<div class="comment-form-comment form-group row"><label class="control-label col-sm-3" for="comment">' . __('Comment', 'wp-starter-theme') . $required_indicator . '</label><div class="col-sm-9"><textarea id="comment" name="comment" class="form-control" rows="8"' . $required_attr . '></textarea></div></div>'; $args['submit_field'] = '<div class="form-submit form-group row"><div class="col-sm-9 col-sm-offset-3">%1$s %2$s</div></div>'; $args['class_submit'] = 'submit btn btn-primary'; $args['format'] = 'html5'; \comment_form($args); }
function get_comments_tree($top) { global $coms; foreach ($top as $id) { $cid = $coms[$id]['id']; echo '<div style="margin:20px 0 10px 30px;" class="comment" comment_id="' . $cid . '">' . '<img src="/blog/_images/avatar_small/' . $coms[$id]['avatar'] . '" style="vertical-align:middle;border:#ccc 1px solid;padding:1px;margin-right:5px;" />' . '<a name="comm_' . $cid . '"></a>' . '<strong><u>' . $coms[$id]['user_name'] . '</u></strong> <span style="font-size:0.8em;color:#666;">' . $coms[$id]['post_date'] . '</span><br/>' . $coms[$id]['content'] . '<br/><br/><a href="?reply_to=' . $cid . '#comm_' . $cid . '" onclick="answerTo(' . $cid . ',this);return false;">ответить</a>'; if (isset($_GET['reply_to']) && $_GET['reply_to'] == $cid) { echo comment_form($discussion_id, $cid); $form_generated = true; } if (count($coms[$id]['cc'])) { get_comments_tree($coms[$id]['cc']); } echo '</div>'; } }
/** * Helper function to display the captcha below the comment input field in themes using comment_form() function * * Copyright (c) 2011 Jono Bruni <jbruni.com.br> - Free software, in the terms of the GNU General Public License. */ function bwp_capt_comment_form($args = array(), $post_id = null) { global $bwp_capt; remove_action('comment_form_after_fields', array($bwp_capt, 'add_recaptcha')); remove_action('comment_form_logged_in_after', array($bwp_capt, 'add_recaptcha')); remove_filter('comment_form_defaults', array($bwp_capt, 'add_recaptcha_after_comment_field')); ob_start(); do_action('bwp_recaptcha_add_markups'); $recaptcha_html = ob_get_contents(); ob_end_clean(); if (isset($args['comment_notes_after'])) { $args['comment_notes_after'] .= $recaptcha_html; } else { $args['comment_notes_after'] = $recaptcha_html; } comment_form($args, $post_id); }
function rotary_edit_announcement() { $comment_id = $_REQUEST['comment_id']; $announcement = get_comment($comment_id); $title = get_comment_meta($comment_id, 'announcement_title', true); $comment_post_ID = $announcement->comment_post_ID; $args = array('title_reply' => rotary_announcement_header($comment_post_ID, $title, 'edit'), 'comment_notes_after' => rotary_comment_notes_after(), 'logged_in_as' => '', 'label_submit' => __('Save Announcement'), 'id_form' => 'ajax-edit-announcement-form'); ob_start(); ?> <div id="edit-announcement-<?php echo $comment_id; ?> -form"> <?php echo comment_form($args, $comment_post_ID); ?> </div> <?php $return = ob_get_clean(); echo $return; die; }
?> </div> </nav><!-- #comment-nav-below --> <?php } // check for comment navigation ?> <?php } // have_comments() ?> <?php // If comments are closed and there are comments, let's leave a little note, shall we? if (!comments_open() && '0' != get_comments_number() && post_type_supports(get_post_type(), 'comments')) { ?> <p class="no-comments"><?php _e('Comments are closed.', 'sennzaversion3'); ?> </p> <?php } ?> <?php comment_form(); ?> </div><!-- .columns --> </div><!-- .row -->
</div> <div class="nav-next"><?php next_comments_link(__('Newer Comments →', 'zerif')); ?> </div> </nav><!-- #comment-nav-below --> <?php } // check for comment navigation ?> <?php } // have_comments() ?> <?php if (!comments_open() && '0' != get_comments_number() && post_type_supports(get_post_type(), 'comments')) { ?> <p class="no-comments"><?php _e('Comments are closed.', 'zerif'); ?> </p> <?php } ?> <?php comment_form(array('comment_notes_after' => '')); ?> </div><!-- #comments -->
<h2 class="comments-title"> <?php printf(_nx('One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'wolf'), number_format_i18n(get_comments_number()), '<span>' . get_the_title() . '</span>'); ?> </h2> <?php } // have_comments() ?> <?php $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; $fields = array('comment_field' => '<p class="comment-form-comment"><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'wolf'), wp_login_url(apply_filters('the_permalink', get_permalink()))) . '</p>', 'logged_in_as' => '<p class="logged-in-as">' . sprintf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out »</a>', 'wolf'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink()))) . '</p>', 'comment_notes_before' => '', 'comment_notes_after' => '', 'title_reply' => '', 'title_reply_to' => __('Leave a Reply to %s', 'wolf'), 'cancel_reply_link' => __('Cancel Reply', 'wolf'), 'label_submit' => __('Submit Comment', 'wolf')); comment_form($fields); ?> <?php if (have_comments()) { ?> <ol class="comment-list"> <?php wp_list_comments(array('callback' => 'wolf_comment', 'style' => 'ol')); ?> </ol><!-- .comment-list --> <?php if (get_comment_pages_count() > 1 && get_option('page_comments')) { ?>
// re-format comment allowed tags $comment_allowedtags = allowed_tags(); $comment_allowedtags = str_replace(array("\r\n", "\r", "\n"), '', $comment_allowedtags); $comment_allowedtags_array = explode('> <', $comment_allowedtags); $formatted_comment_allowedtags = ''; foreach ($comment_allowedtags_array as $item) { $formatted_comment_allowedtags .= '<code>'; if ($comment_allowedtags_array[0] != $item) { $formatted_comment_allowedtags .= '<'; } $formatted_comment_allowedtags .= $item; if (end($comment_allowedtags_array) != $item) { $formatted_comment_allowedtags .= '>'; } $formatted_comment_allowedtags .= '</code> '; } $comment_allowed_tags = $formatted_comment_allowedtags; unset($comment_allowedtags, $comment_allowedtags_array, $formatted_comment_allowedtags); ob_start(); comment_form(array('class_submit' => 'btn btn-primary', 'fields' => array('author' => '<div class="form-group">' . '<label class="control-label col-md-2" for="author">' . __('Name', 'bootstrap-basic') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<div class="col-md-10">' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' class="form-control" />' . '</div>' . '</div>', 'email' => '<div class="form-group">' . '<label class="control-label col-md-2" for="email">' . __('Email', 'bootstrap-basic') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<div class="col-md-10">' . '<input id="email" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' class="form-control" />' . '</div>' . '</div>', 'url' => '<div class="form-group">' . '<label class="control-label col-md-2" for="url">' . __('Website', 'bootstrap-basic') . '</label> ' . '<div class="col-md-10">' . '<input id="url" name="url" ' . ($html5 ? 'type="url"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_url']) . '" size="30" class="form-control" />' . '</div>' . '</div>'), 'comment_field' => '<div class="form-group">' . '<label class="control-label col-md-2" for="comment">' . _x('Comment', 'noun') . '</label> ' . '<div class="col-md-10">' . '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" class="form-control"></textarea>' . '</div>' . '</div>', 'comment_notes_after' => '<p class="help-block">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'bootstrap-basic'), $comment_allowed_tags) . '</p>')); /** * WordPress comment form does not support action/filter form and input submit elements. Rewrite these code when there is support available. * @todo Change form class modification to use WordPress hook action/filter when it's available. */ $comment_form = str_replace('class="comment-form', 'class="comment-form form form-horizontal', ob_get_clean()); echo $comment_form; unset($comment_allowed_tags, $comment_form); ?> </div><!-- #comments -->
previous_comments_link(__('← Older Comments', 'vanilj')); ?> </div> <div class="nav-next"><?php next_comments_link(__('Newer Comments →', 'vanilj')); ?> </div> </nav> <?php } ?> <?php } ?> <?php if (!comments_open()) { ?> <p class="no-comments"><?php _e('Comments are closed.', 'vanilj'); ?> </p> <?php } ?> <?php comment_form(array('comment_notes_after' => '', 'title_reply' => __('Leave a Reply', 'vanilj'), 'logged_in_as' => '<p class="logged-in-as">' . sprintf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'vanilj'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink()))) . '</p>', 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x('Comment', 'noun', 'vanilj') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', 'label_submit' => __('Post Comment', 'vanilj'))); ?> </div>
?> <?php } // have_comments() ?> <?php // If comments are closed and there are comments, let's leave a little note, shall we? if (!comments_open() && '0' != get_comments_number() && post_type_supports(get_post_type(), 'comments')) { ?> <p class="no-comments"><?php _e('Comments are closed.', 'rookie'); ?> </p> <?php } ?> <?php $args = array(); if ('0' == get_comments_number()) { $args['title_reply'] = __('Start a Conversation', 'rookie'); } else { $args['title_reply'] = __('Join the Conversation', 'rookie'); } comment_form($args); ?> </div><!-- #comments -->
//echo '<p class="add_review"><a href="#review_form" class="show_review_form button"><span>'.__('Add Review', 'woocommerce').'</span></a></p>'; echo '<hr>'; $title_reply = __('Add a review', 'woocommerce'); } else { $title_reply = __('Be the first to review', 'woocommerce') . ' “' . $post->post_title . '”'; echo '<p>' . __('There are no reviews yet, would you like to <a href="#review_form" class="inline show_review_form">submit yours</a>?', 'woocommerce') . '</p>'; } $commenter = wp_get_current_commenter(); echo '</div><div id="review_form_wrapper"><div id="review_form" class="form">'; $comment_form = array('title_reply' => $title_reply, 'comment_notes_before' => '', 'comment_notes_after' => '', 'fields' => array('author' => '<div class="formField">' . '<label for="author">' . __('Name', 'woocommerce') . '<span class="required">*</span>' . '</label> ' . '<input id="author" name="author" type="text" class="textField" value="' . esc_attr($commenter['comment_author']) . '" size="30" /></p>' . '<div class="clear"></div>' . '</div>', 'email' => '<div class="formField">' . '<label for="email">' . __('Email', 'woocommerce') . '<span class="required">*</span>' . '</label> ' . '<input id="email" name="email" type="text" class="textField" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" aria-required="true" /></p>' . '<div class="clear"></div>' . '</div>'), 'label_submit' => __('Submit Review', 'woocommerce'), 'logged_in_as' => '', 'comment_field' => ''); if (get_option('woocommerce_enable_review_rating') == 'yes') { $comment_form['comment_field'] = '<p class="comment-form-rating"><label for="rating">' . __('Rating', 'woocommerce') . '</label><select name="rating" id="rating"> <option value="">' . __('Rate…', 'woocommerce') . '</option> <option value="5">' . __('Perfect', 'woocommerce') . '</option> <option value="4">' . __('Good', 'woocommerce') . '</option> <option value="3">' . __('Average', 'woocommerce') . '</option> <option value="2">' . __('Not that bad', 'woocommerce') . '</option> <option value="1">' . __('Very Poor', 'woocommerce') . '</option> </select></p>'; } $comment_form['comment_field'] .= ' <p class="comment-form-comment"> <label for="comment">' . __('Your Review', 'woocommerce') . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea> </p>' . $woocommerce->nonce_field('comment_rating', true, false); comment_form($comment_form); echo '</div></div>'; ?> <div class="clear"></div></div> <?php }
<?php if ( get_option( 'page_comments' ) ) : ?> <div class="comment-navigation comment-pagination paged-navigation"> <?php paginate_comments_links(); ?> </div><!-- .comment-navigation --> <?php endif; ?> </div><!-- #comments --> <?php else : ?> <?php if ( pings_open() && !comments_open() ) : ?> <p class="comments-closed pings-open"> <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', hybrid_get_parent_textdomain() ), trackback_url( '0' ) ); ?> </p><!-- .comments-closed .pings-open --> <?php endif; ?> <?php endif; ?> <?php //modify comment form $args = array( 'title_reply' => __('Leave a comment'), 'label_submit' => __('Submit'), ); ?> <?php comment_form( $args ); // Load the comment form. ?> </div><!-- #comments-template -->
* the visitor has not yet entered the password we will * return early without loading the comments. */ if (post_password_required()) { return; } ?> <div id="comments" class="comments-area"> <?php comment_form(array('comment_notes_after' => '', 'comment_notes_before' => '', 'comment_field' => '<p class="comment-form-comment"><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" placeholder="' . __('Write your comment here ...', 'maskitto-light') . '"></textarea></p>', 'fields' => apply_filters('comment_form_default_fields', array('author' => '<p class="comment-form-author"> <input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" placeholder = "' . __('Name ', 'maskitto-light') . ($req ? '*' : '') . '" size="30" /> </p>', 'email' => '<p class="comment-form-email"> <input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" placeholder = "' . __('Email ', 'maskitto-light') . ($req ? '*' : '') . '" size="30" /> </p>', 'url' => '<p class="comment-form-url"> <input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" placeholder = "' . __('Website ', 'maskitto-light') . ($req ? '*' : '') . '" size="30" /> </p>')))); ?> <?php if (have_comments()) { ?> <?php if (!isset($maskitto_light['blog-layout']) || $maskitto_light['blog-layout'] == 1) { ?> <div class="blog-layout-2-comments"> <div class="page-blog" style="height: 15px; margin: 0 -56px; padding: 0!important; margin-top: 30px;"></div>
public function load_ajax_commentform() { if (!ap_user_can_comment()) { _e('No Permission', 'ap'); die; } $args = explode('-', sanitize_text_field($_REQUEST['args'])); $action = get_post_type($args[0]) . '-' . $args[0]; if (wp_verify_nonce($args[1], $action)) { $comment_args = array('title_reply' => '', 'logged_in_as' => '', 'comment_field' => '<div class="ap-comment-ta"><textarea name="comment" rows="3" aria-required="true" class="form-control autogrow" placeholder="' . __('Respond to the post.', 'ap') . '"></textarea></div><input type="hidden" name="ap_comment_form" value="true"/>', 'comment_notes_after' => ''); $current_user = get_userdata(get_current_user_id()); echo '<div class="comment-form-c clearfix">'; echo '<div class="ap-content-inner">'; comment_form($comment_args, $args[0]); echo '</div>'; echo '</div>'; } die; }
?> <p class="nocomments"><?php _e('Comments are closed.', 'tokopress'); ?> </p> <?php } ?> <?php } // have_comments() ?> <?php //comment_form(); ?> <div id="comments-form"> <?php $comment_args = array('title_reply' => __('Post Your Comments', 'tokopress'), 'fields' => apply_filters('comment_form_default_fields', array('block-open' => '', 'author' => '<input id="author" name="author" type="text" placeholder="' . __('Your name', 'tokopress') . '" />', 'email' => '<input id="email" name="email" type="email" placeholder="' . __('Your email', 'tokopress') . '" />', 'url' => '<input id="url" name="url" type="text" placeholder="' . __('Your website URL', 'tokopress') . '" />', 'block-close' => '')), 'comment_field' => '<textarea id="comment" name="comment" placeholder="' . __('post your comment here!', 'tokopress') . '" aria-required="true"></textarea>', 'comment_notes_after' => '', 'label_submit' => __('Submit Comment', 'tokopress')); ?> <?php comment_form($comment_args); ?> </div><!-- #comments-form --> </div><!-- #comments .comments-area -->
?> <?php if (!comments_open() && get_comments_number()) { ?> <h2 class="comments-closed-title"> <?php _e('Comments are closed', 'teaberry'); ?> </h2> <?php } ?> <?php } ?> <?php /* override comment form markup */ $f_markup = '<p class="comment-form-comment">'; $f_markup .= '<textarea id="comment" name="comment" '; $f_markup .= 'cols="45" rows="8" aria-required="true">'; $f_markup .= '</textarea></p>'; /* set title and form */ $settings = array('title_reply' => __('Leave a comment', 'teaberry'), 'comment_field' => $f_markup); comment_form($settings); ?> </div><!-- #comments .comments-area -->
?> <?php if (!comments_open()) { ?> <p class="no-comments"><?php _e('Comments are closed.', 'tt'); ?> </p> <?php } ?> <?php } // have_comments() ?> <div id="reply-title" class="custom-heading"> <h3 class="title"><span><?php _e('Leave a Reply', 'tt'); ?> </span></h3> </div> <?php $custom_args = array('title_reply' => __(' ', 'tt'), 'comment_notes_after' => '', 'cancel_reply_link' => __('Cancel Reply', 'tt'), 'label_submit' => __('Submit Comment', 'tt'), 'comment_notes_before' => '', 'comment_field' => '<div class="comment-form-comment form-group"><label for="comment">' . _x('Comment', 'noun', 'tt') . '</label><textarea id="comment" class="form-control" name="comment" cols="45" rows="8" aria-required="true"></textarea></div>'); comment_form($custom_args); ?> </div><!-- #comments -->
<section class="col-md-12"> <div class="wp-pagenavi"> <div class="left"><?php previous_comments_link(__('«', 'lookilite')); ?> </div> <div class="right"><?php next_comments_link(__('»', 'lookilite')); ?> </div> <div class="clear"></div> </div> </section> <?php } ?> <div class="clear"></div> <section class="col-md-12"> <?php comment_form(array('label_submit' => __('Leave a reply', 'lookilite'))); ?> </section>
?> <?php /* If there are no comments and comments are closed, let's leave a note. * But we only want the note on posts and pages that had comments in the first place. */ if (!comments_open() && get_comments_number()) { ?> <p class="nocomments"><?php _e('Comments are closed.', 'boss'); ?> </p> <?php } ?> <?php } // have_comments() ?> <?php if (is_user_logged_in()) { comment_form(array('title_reply' => '', 'logged_in_as' => '', 'comment_notes_after' => '', 'label_submit' => __('Comment', 'boss'))); } ?> </div><!-- #comments .comments-area --> <?php } // comments_open()
<div class="nav-next span_12 col"><?php next_comments_link(__('Newer Comments →', 'att')); ?> </div> </nav> <?php } // Check for comment navigation ?> <?php if (!comments_open() && get_comments_number()) { ?> <p class="no-comments"><?php _e('Comments are closed.', 'att'); ?> </p> <?php } ?> <?php } // have_comments() ?> <?php comment_form($fields = array('title_reply' => '<span>' . __('Leave a Reply') . '</span>')); ?> </div><!-- #comments -->
<?php } else { ?> <h2 class="comments-title"> <?php echo apply_filters('toutatis_first_comment', __('Be the first to post a comment.', 'toutatis')); ?> </h2> <?php do_action('toutatis_before_comment_form'); ?> <?php comment_form(toutatis_comment_form_args()); ?> <?php do_action('toutatis_after_comment_form'); ?> <?php } ?> <?php if (!comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments')) { ?> <?php
?> <div id="review_form_wrapper"><div id="review_form"> <?php $comment_form = array('title_reply' => $title_reply, 'comment_notes_before' => '', 'comment_notes_after' => '', 'fields' => array('author' => '<p class="comment-form-author">' . '<label for="author">' . __('Name', 'thefoxwp') . '</label> ' . '<span class="required">*</span>' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" aria-required="true" /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __('Email', 'thefoxwp') . '</label> ' . '<span class="required">*</span>' . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" aria-required="true" /></p>'), 'label_submit' => __('Submit Review', 'thefoxwp'), 'logged_in_as' => '', 'comment_field' => ''); if (get_option('woocommerce_enable_review_rating') == 'yes') { $comment_form['comment_field'] = '<p class="comment-form-rating"><label for="rating">' . __('Rating', 'thefoxwp') . '</label><select name="rating" id="rating"> <option value="">' . __('Rate…', 'thefoxwp') . '</option> <option value="5">' . __('Perfect', 'thefoxwp') . '</option> <option value="4">' . __('Good', 'thefoxwp') . '</option> <option value="3">' . __('Average', 'thefoxwp') . '</option> <option value="2">' . __('Not that bad', 'thefoxwp') . '</option> <option value="1">' . __('Very Poor', 'thefoxwp') . '</option> </select></p>'; } $comment_form['comment_field'] .= '<p class="comment-form-comment"><label for="comment">' . __('Your Review', 'thefoxwp') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>' . wp_nonce_field('comment_rating', true, false); comment_form(apply_filters('woocommerce_product_review_comment_form_args', $comment_form)); echo '</div></div>'; } else { ?> <p class="woocommerce-verification-required"><?php _e('Only logged in customers who have purchased this product may leave a review.', 'thefoxwp'); ?> </p> <?php } ?> <div class="clear"></div></div> <?php }
} ?> <ol class="commentlist"> <?php // List comments wp_list_comments(array('callback' => 'origami_comment')); ?> </ol> <?php } ?> <?php $commenter = wp_get_current_commenter(); comment_form(array('fields' => array('author' => sprintf('<input name="author" type="text" placeholder="%s" value="' . esc_attr($commenter['comment_author']) . '" />', __('Name*', 'origami')), 'email' => sprintf('<input name="email" type="text" placeholder="%s" value="' . esc_attr($commenter['comment_author_email']) . '" />', __('Email*', 'origami')), 'url' => sprintf('<input name="url" type="text" placeholder="%s" value="' . esc_attr($commenter['comment_author_url']) . '" />', __('Website', 'origami'))), 'comment_field' => '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>')); ?> </div> <?php } ?> <?php if (!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) { ?> <div id="comments" class="comments-disabled content"> <p><?php _e('Comments are Disabled', 'origami'); ?> </p> </div>
function my_comment_form() { ob_start(); $comment_args = array('fields' => apply_filters('comment_form_default_fields', array('author' => '<div class="form-group"><label for="author" class="col-lg-2 control-label">Name<span>*</span></label>' . '<div class="col-lg-10"><input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" class="form-control"' . $aria_req . ' /></div></div>', 'email' => '<div class="form-group"><label for="author" class="col-lg-2 control-label">Email<span>*</span></label>' . '<div class="col-lg-10"><input id="email" name="email" type="email" value="' . esc_attr($commenter['comment_author_email']) . '" class="form-control"' . $aria_req . ' /></div></div>', 'url' => '')), 'comment_field' => '<div class="form-group"><label for="author" class="col-lg-2 control-label">Comment<span>*</span></label>' . '<div class="col-lg-10"><textarea id="comment" name="comment" rows="3" class="form-control" aria-required="true"></textarea></div></div>', 'class_submit' => 'btn btn-primary'); comment_form($comment_args); echo str_replace('class="comment-form"', 'class="form-horizontal"', ob_get_clean()); }
function output($options) { global $dslc_active; $post_id = $options['post_id']; $show_fake = true; if (is_singular() && get_post_type() !== 'dslc_templates') { $post_id = get_the_ID(); $show_fake = false; } $this->module_start($options); /* Module output starts here */ ?> <div class="dslc-tp-comment-form"> <?php if ($show_fake) { ?> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title">Leave a Comment</h3> <form action="http://localhost/livecomposer/wp-comments-post.php" method="post" id="commentform" class="comment-form" onsubmit="return(false)"> <div class="comment-form-name"><input id="author" name="author" type=text value="John Doe" size="30" placeholder="Name *" aria-required="true"></div> <div class="comment-form-email"><input id="email" name="email" type=text value="*****@*****.**" size="30" placeholder="Email *" aria-required="true"></div> <div class="comment-form-website"><input id="url" name="url" type=text value="http://johndoe.com" size="30" placeholder="Website"></div> <div class="comment-form-comment"><textarea id="comment" name="comment" placeholder="Comment" aria-required="true">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmodtempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</textarea></div> <p class="form-submit"> <input name="submit" type="submit" id="submit" value="SUBMIT YOUR COMMENT"> <input type="hidden" name="comment_post_ID" value="14" id="comment_post_ID"> <input type="hidden" name="comment_parent" id="comment_parent" value="0"> </p> </form> </div><!-- #respond --> <?php } else { global $commenter; comment_form(array('label_submit' => __('SUBMIT YOUR COMMENT', 'dslc_string'), 'cancel_reply_link' => 'cancel', 'comment_notes_before' => '', 'comment_notes_after' => '', 'title_reply' => __('Leave a Comment', 'dslc_string'), 'title_reply_to' => __('Reply to %s.', 'dslc_string'), 'comment_field' => '<div class="comment-form-comment"><textarea id="comment" name="comment" placeholder="' . __('Comment', 'dslc_string') . '" aria-required="true"></textarea></div>', 'fields' => apply_filters('comment_form_default_fields', array('author' => '<div class="comment-form-name"><input id="author" name="author" type=text value="' . esc_attr($commenter['comment_author']) . '" size="30" placeholder="' . __('Name', 'dslc_string') . ' *" aria-required="true" /></div>', 'email' => '<div class="comment-form-email"><input id="email" name="email" type=text value="' . esc_attr($commenter['comment_author_email']) . '" size="30" placeholder="' . __('Email', 'dslc_string') . ' *" aria-required="true" /></div>', 'url' => '<div class="comment-form-website"><input id="url" name="url" type=text value="' . esc_attr($commenter['comment_author_url']) . '" size="30" placeholder="' . __('Website', 'dslc_string') . '" /></div>'))), $post_id); } ?> </div><!-- dslc-tp-comment-form --> <?php /* Module output ends here */ $this->module_end($options); }