<div id="respond"> <?php if ($_GET["replytocom"] != "") { echo '<div class="cancel-comment-reply">'; $comment_id_7 = get_comment($_GET["replytocom"]); $name = $comment_id_7->comment_name; cancel_comment_reply_link('Cancelar la respuesta al comentario de'); ?> <?php echo $comment_id_7->comment_author; echo '</div>'; } if (get_option('comment_registration') && !is_user_logged_in()) { ?> <p><?php e_("You must be logged in to post a comment.", "notesblog"); ?> <a href="<?php echo wp_login_url(get_permalink()); ?> "><?php _e("So log in!", "notesblog");
<!-- #comments --> <?php /* Stop the rest of comments.php from being processed, * but don't kill the script entirely -- we still have * to fully load the template. */ return; } ?> <?php if (comments_open()) { ?> <div id="respond"> <div class="cancel_comment_reply"> <?php cancel_comment_reply_link('取消回复'); ?> </div> <form action="<?php echo get_option('siteurl'); ?> /wp-comments-post.php" method="post" id="commentform"> <div class="f-publish" id="real-avatar"> <span> <?php if (isset($_COOKIE['comment_author_email_' . COOKIEHASH])) { ?> <?php echo get_avatar($comment_author_email, 50); ?> <?php
?> :</strong> <?php printf(__('You can use these tags: %s', 'guangzhou'), allowed_tags()); ?> </small></p> <p><textarea class="text" name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p> <p> <div id="cancel-comment-reply"> <input class="button-primary" name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'guangzhou'); ?> " /> <small><?php cancel_comment_reply_link(__('| Cancel Reply', 'guangzhou')); ?> </small> </div> </p> <?php do_action('comment_form', $post->ID); ?> </form> </div> <?php } ?> <?php
_e('Your website address', 'carrington-mobile'); ?> " for="url"><small><?php _e('Web', 'carrington-mobile'); ?> </small></label> </p> <?php } ?> <p><textarea name="comment" id="comment" rows="8" cols="40"></textarea></p> <p> <input name="submit" type="submit" id="submit" value="<?php _e('Submit comment', 'carrington-mobile'); ?> " tabindex="5" /> <?php cancel_comment_reply_link('cancel reply'); ?> </p> <?php comment_id_fields(); do_action('comment_form', $post->ID); ?> </form> </div> <?php } // If registration required and not logged in } // If you delete this the sky will fall on your head
<?php if ('open' == $post->comment_status) { ?> <div id="respond"> <h3><?php comment_form_title(__('Leave a Reply', 'default'), __('Leave a Reply to %s', 'default')); ?> </h3> <div class="cancel-comment-reply"> <?php // cancel_comment_reply_link(); ?> <?php cancel_comment_reply_link(__('Click here to cancel reply.', 'default')); ?> </div> <?php if (get_option('comment_registration') && !$user_ID) { ?> <div class="you-must-be-logged-in"> <?php _e('You must be', 'default'); ?> <a href="<?php echo get_option('siteurl'); ?> /wp-login.php?redirect_to=<?php
?> <?php } // end have_comments() ?> <?php if (comments_open()) { ?> <div id="respond"> <h3><?php comment_form_title(__('发表评论', 'lovnvns'), __('回复 %s 的评论', 'lovnvns')); cancel_comment_reply_link(__(' 取消', 'lovnvns')); ?> </h3> <?php if (get_option('lovnvns_comment_ad') != "") { echo '<div id="form_ad">' . get_option('lovnvns_comment_ad') . '</div>'; } ?> <div id="formcomment"> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <p><?php _e('您必须', 'lovnvns'); ?> <a href="<?php
?> " size="22" tabindex="3" /> <label for="url"><small><?php _e('Website', 'lightword'); ?> </small></label></p> <?php } ?> <p><input name="submit" type="submit" id="submit" tabindex="4" accesskey="s" value="<?php echo attribute_escape(__('Submit', 'lightword')); ?> " /><?php cancel_comment_reply_link(__('( Cancel )', 'lightword')); ?> <br class="clear"/></p> <?php comment_id_fields(); do_action('comment_form', $post->ID); ?> </form> <?php } ?> </div> <?php } ?> </div>
<ol> <?php wp_list_comments('type=pings&callback=custom_pings'); ?> </ol> </div><!-- #trackbacks-list .comments --> <?php endif /* if ( $ping_count ) */ ?> <?php endif /* if ( $comments ) */ ?> <?php if ( 'open' == $post->comment_status ) : ?> <div id="respond"> <h3><?php comment_form_title( __('Post a Comment', 'uthili'), __('Post a Reply to %s', 'uthili') ); ?></h3> <div id="cancel-comment-reply"><?php cancel_comment_reply_link() ?></div> <?php if ( get_option('comment_registration') && !$user_ID ) : ?> <p id="login-req"><?php printf(__('You must be <a href="%s" title="Log in">logged in</a> to post a comment.', 'uthili'), get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink() ) ?></p> <?php else : ?> <div class="formcontainer"> <form id="commentform" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> <?php if ( $user_ID ) : ?> <p id="login"><?php printf(__('<span class="loggedin">Logged in as <a href="%1$s" title="Logged in as %2$s">%2$s</a>.</span> <span class="logout"><a href="%3$s" title="Log out of this account">Log out?</a></span>', 'uthili'), get_option('siteurl') . '/wp-admin/profile.php', wp_specialchars($user_identity, true),
/** * Output a complete commenting form for use within a template. * * Most strings and form fields may be controlled through the $args array passed * into the function, while you may also choose to use the comment_form_default_fields * filter to modify the array of default fields if you'd just like to add a new * one or remove a single field. All fields are also individually passed through * a filter of the form comment_form_field_$name where $name is the key used * in the array of fields. * * @since 3.0.0 * @since 4.1.0 Introduced the 'class_submit' argument. * @since 4.2.0 Introduced 'submit_button' and 'submit_fields' arguments. * * @param array $args { * Optional. Default arguments and form fields to override. * * @type array $fields { * Default comment fields, filterable by default via the 'comment_form_default_fields' hook. * * @type string $author Comment author field HTML. * @type string $email Comment author email field HTML. * @type string $url Comment author URL field HTML. * } * @type string $comment_field The comment textarea field HTML. * @type string $must_log_in HTML element for a 'must be logged in to comment' message. * @type string $logged_in_as HTML element for a 'logged in as [user]' message. * @type string $comment_notes_before HTML element for a message displayed before the comment form. * Default 'Your email address will not be published.'. * @type string $comment_notes_after HTML element for a message displayed after the comment form. * @type string $id_form The comment form element id attribute. Default 'commentform'. * @type string $id_submit The comment submit element id attribute. Default 'submit'. * @type string $class_submit The comment submit element class attribute. Default 'submit'. * @type string $name_submit The comment submit element name attribute. Default 'submit'. * @type string $title_reply The translatable 'reply' button label. Default 'Leave a Reply'. * @type string $title_reply_to The translatable 'reply-to' button label. Default 'Leave a Reply to %s', * where %s is the author of the comment being replied to. * @type string $cancel_reply_link The translatable 'cancel reply' button label. Default 'Cancel reply'. * @type string $label_submit The translatable 'submit' button label. Default 'Post a comment'. * @type string $submit_button HTML format for the Submit button. * Default: '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />'. * @type string $submit_field HTML format for the markup surrounding the Submit button and comment hidden * fields. Default: '<p class="form-submit">%1$s %2$s</a>', where %1$s is the * submit button markup and %2$s is the comment hidden fields. * @type string $format The comment form format. Default 'xhtml'. Accepts 'xhtml', 'html5'. * } * @param int|WP_Post $post_id Post ID or WP_Post object to generate the form for. Default current post. */ function comment_form($args = array(), $post_id = null) { if (null === $post_id) { $post_id = get_the_ID(); } $commenter = wp_get_current_commenter(); $user = wp_get_current_user(); $user_identity = $user->exists() ? $user->display_name : ''; $args = wp_parse_args($args); if (!isset($args['format'])) { $args['format'] = current_theme_supports('html5', 'comment-form') ? 'html5' : 'xhtml'; } $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; $html_req = $req ? " required='required'" : ''; $html5 = 'html5' === $args['format']; $fields = array('author' => '<p class="comment-form-author">' . '<label for="author">' . __('Name') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . $html_req . ' /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __('Email') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<input id="email" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30" aria-describedby="email-notes"' . $aria_req . $html_req . ' /></p>', 'url' => '<p class="comment-form-url"><label for="url">' . __('Website') . '</label> ' . '<input id="url" name="url" ' . ($html5 ? 'type="url"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></p>'); $required_text = sprintf(' ' . __('Required fields are marked %s'), '<span class="required">*</span>'); /** * Filter the default comment form fields. * * @since 3.0.0 * * @param array $fields The default comment fields. */ $fields = apply_filters('comment_form_default_fields', $fields); $defaults = array('fields' => $fields, 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x('Comment', 'noun') . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" required="required"></textarea></p>', 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</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>'), get_edit_user_link(), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __('Your email address will not be published.') . '</span>' . ($req ? $required_text : '') . '</p>', 'comment_notes_after' => '', 'id_form' => 'commentform', 'id_submit' => 'submit', 'class_submit' => 'submit', 'name_submit' => 'submit', 'title_reply' => __('Leave a Reply'), 'title_reply_to' => __('Leave a Reply to %s'), 'cancel_reply_link' => __('Cancel reply'), 'label_submit' => __('Post Comment'), 'submit_button' => '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />', 'submit_field' => '<p class="form-submit">%1$s %2$s</p>', 'format' => 'xhtml'); /** * Filter the comment form default arguments. * * Use 'comment_form_default_fields' to filter the comment fields. * * @since 3.0.0 * * @param array $defaults The default comment form arguments. */ $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults)); // Ensure that the filtered args contain all required default values. $args = array_merge($defaults, $args); if (comments_open($post_id)) { ?> <?php /** * Fires before the comment form. * * @since 3.0.0 */ do_action('comment_form_before'); ?> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title"><?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small><?php cancel_comment_reply_link($args['cancel_reply_link']); ?> </small> </h3> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <?php echo $args['must_log_in']; ?> <?php /** * Fires after the HTML-formatted 'must log in after' message in the comment form. * * @since 3.0.0 */ do_action('comment_form_must_log_in_after'); ?> <?php } else { ?> <form action="<?php echo site_url('/wp-comments-post.php'); ?> " method="post" id="<?php echo esc_attr($args['id_form']); ?> " class="comment-form"<?php echo $html5 ? ' novalidate' : ''; ?> > <?php /** * Fires at the top of the comment form, inside the form tag. * * @since 3.0.0 */ do_action('comment_form_top'); ?> <?php if (is_user_logged_in()) { ?> <?php /** * Filter the 'logged in' message for the comment form for display. * * @since 3.0.0 * * @param string $args_logged_in The logged-in-as HTML-formatted message. * @param array $commenter An array containing the comment author's * username, email, and URL. * @param string $user_identity If the commenter is a registered user, * the display name, blank otherwise. */ echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity); ?> <?php /** * Fires after the is_user_logged_in() check in the comment form. * * @since 3.0.0 * * @param array $commenter An array containing the comment author's * username, email, and URL. * @param string $user_identity If the commenter is a registered user, * the display name, blank otherwise. */ do_action('comment_form_logged_in_after', $commenter, $user_identity); ?> <?php } else { ?> <?php echo $args['comment_notes_before']; ?> <?php /** * Fires before the comment fields in the comment form. * * @since 3.0.0 */ do_action('comment_form_before_fields'); foreach ((array) $args['fields'] as $name => $field) { /** * Filter a comment form field for display. * * The dynamic portion of the filter hook, `$name`, refers to the name * of the comment form field. Such as 'author', 'email', or 'url'. * * @since 3.0.0 * * @param string $field The HTML-formatted output of the comment form field. */ echo apply_filters("comment_form_field_{$name}", $field) . "\n"; } /** * Fires after the comment fields in the comment form. * * @since 3.0.0 */ do_action('comment_form_after_fields'); ?> <?php } ?> <?php /** * Filter the content of the comment textarea field for display. * * @since 3.0.0 * * @param string $args_comment_field The content of the comment textarea field. */ echo apply_filters('comment_form_field_comment', $args['comment_field']); ?> <?php echo $args['comment_notes_after']; ?> <?php $submit_button = sprintf($args['submit_button'], esc_attr($args['name_submit']), esc_attr($args['id_submit']), esc_attr($args['class_submit']), esc_attr($args['label_submit'])); /** * Filter the submit button for the comment form to display. * * @since 4.2.0 * * @param string $submit_button HTML markup for the submit button. * @param array $args Arguments passed to `comment_form()`. */ $submit_button = apply_filters('comment_form_submit_button', $submit_button, $args); $submit_field = sprintf($args['submit_field'], $submit_button, get_comment_id_fields($post_id)); /** * Filter the submit field for the comment form to display. * * The submit field includes the submit button, hidden fields for the * comment form, and any wrapper markup. * * @since 4.2.0 * * @param string $submit_field HTML markup for the submit field. * @param array $args Arguments passed to comment_form(). */ echo apply_filters('comment_form_submit_field', $submit_field, $args); /** * Fires at the bottom of the comment form, inside the closing </form> tag. * * @since 1.5.0 * * @param int $post_id The post ID. */ do_action('comment_form', $post_id); ?> </form> <?php } ?> </div><!-- #respond --> <?php /** * Fires after the comment form. * * @since 3.0.0 */ do_action('comment_form_after'); } else { /** * Fires after the comment form if comments are closed. * * @since 3.0.0 */ do_action('comment_form_comments_closed'); } }
<?php if (function_exists('show_subscription_checkbox')) { ?> <p><?php show_subscription_checkbox(); ?> </p> <?php } ?> <p> <input name="submit" type="submit" id="sbutt" tabindex="5" value="<?php _e('Submit Comment', 'arras'); ?> " /> <?php cancel_comment_reply_link(__('Cancel Reply', 'arras')); ?> </p> <?php do_action('comment_form', $post->ID); ?> </form> <?php if (function_exists('show_manual_subscription_form')) { show_manual_subscription_form(); } ?> </div><!-- end #commentsform --></div> <?php }
function render($params = array()) { global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage; global $gantry; $fparams = $this->_getParams($params); $comment_layout_name = 'comment_' . $fparams->commentLayout; $layout = $gantry->_getLayout($comment_layout_name); $className = 'GantryLayout' . ucfirst($comment_layout_name); // Do not delete these lines ob_start(); if (post_password_required()) { ?> <span class="alert"><?php _ge('This post is password protected. Enter the password to view comments.'); ?> </span> <?php return ob_get_clean(); } ?> <!-- You can start editing here. --> <?php if (have_comments()) { ?> <br/> <div class="comment-section"> <div class="contentheading"><?php comments_number(_g('No Comments'), _g('1 Comment'), _g('% Comments')); ?> </div> </div> <ol class="commentlist"> <?php wp_list_comments(array('style' => 'ol', 'callback' => array($className, 'render_comment'), 'reply_text' => _g('Reply'))); ?> </ol> <div class="rt-pagination nav"> <div class="alignleft"><?php next_comments_link('« ' . _g('Older Comments')); ?> </div> <div class="alignright"><?php previous_comments_link(_g('Newer Comments') . ' »'); ?> </div> <div class="clear"></div> </div> <?php } else { // this is displayed if there are no comments so far ?> <?php if (comments_open()) { ?> <!-- If comments are open, but there are no comments. --> <?php } else { // comments are closed ?> <!-- If comments are closed. --> <div class="attention"> <div class="icon"><?php _ge('Comments are closed.'); ?> </div> </div> <?php } ?> <?php } ?> <!-- RESPOND --> <?php if (comments_open()) { ?> <div id="respond"> <div class="comment-section"> <div class="contentheading"><?php comment_form_title(_g('Leave a Reply'), _g('Leave a Reply to %s')); ?> </div> </div> <div class="cancel-comment-reply"> <small><?php cancel_comment_reply_link(); ?> </small> </div> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <div class="attention"> <div class="icon"><?php _ge('You must be'); ?> <a href="<?php echo wp_login_url(get_permalink()); ?> "><?php _ge('logged in'); ?> </a> <?php _ge('to post a comment.'); ?> </div> </div> <?php } else { ?> <!-- Begin Form --> <form action="<?php echo get_option('siteurl'); ?> /wp-comments-post.php" method="post" id="commentform"> <?php if (is_user_logged_in()) { ?> <p><?php _ge('Logged in as'); ?> <a href="<?php echo get_option('siteurl'); ?> /wp-admin/profile.php"><?php echo $user_identity; ?> </a>. <a href="<?php echo wp_logout_url(get_permalink()); ?> " title="<?php _ge('Log out of this account'); ?> "><?php _ge('Log out'); ?> »</a></p> <?php } else { ?> <p> <input type="text" name="author" id="author" onblur="if(this.value=='') this.value='<?php _ge('Name (Required)'); ?> ';" onfocus="if(this.value=='<?php _ge('Name (Required)'); ?> ') this.value='';" value="Name (Required)" size="22" tabindex="1" <?php if ($req) { echo "aria-required='true'"; } ?> /> </p> <p> <input type="text" name="email" id="email" onblur="if(this.value=='') this.value='<?php _ge('E-mail (Required)'); ?> ';" onfocus="if(this.value=='<?php _ge('E-mail (Required)'); ?> ') this.value='';" value="E-mail (Required)" size="22" tabindex="2" <?php if ($req) { echo "aria-required='true'"; } ?> /> </p> <p> <input type="text" name="url" id="url" onblur="if(this.value=='') this.value='<?php _ge('Website'); ?> ';" onfocus="if(this.value=='<?php _ge('Website'); ?> ') this.value='';" value="Website" size="22" tabindex="3"/> </p> <?php } ?> <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?> </code></small></p>--> <p style="margin: 0;"> <textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea> </p><br/> <input class="button" name="submit" type="submit" id="submit" tabindex="5" value="<?php _ge('Submit'); ?> "/> <div class="clear"></div> <?php comment_id_fields(); ?> <?php do_action('comment_form', $post->ID); ?> </form> <!-- End Form --> <?php } // If registration required and not logged in ?> </div> <?php } // if you delete this the sky will fall on your head ?> <?php return ob_get_clean(); }
<form role="form" action="<?php echo get_option('siteurl'); ?> /wp-comments-post.php" method="post" id="comment-form" class="row"> <div class="form-group"> <script type="text/plain" id="myEditor" style="width:100%;height:240px;"></script> </div> <input id="editor" class="post_input" value="" name="comment" type="hidden" /> <div class="form-inline"> <button type="submit" class="btn btn-primary">回复</button> <?php cancel_comment_reply_link('<span class="btn btn-default">取消回复</span>'); ?> </div> <?php comment_id_fields(); ?> <?php do_action('comment_form', $post->ID); ?> </form> <script type="text/javascript"> var ue = UM.getEditor('myEditor'); ue.addListener('blur',function(){
?> <br/> <textarea name="comment" title="<?php _e('Message', THEMEDOMAIN); ?> *" cols="40" rows="3" id="comment" tabindex="4" style="width:96%"></textarea> <br /> <p> <input name="submit" type="submit" id="submit" value="<?php _e('Submit', THEMEDOMAIN); ?> " tabindex="5" /> <?php cancel_comment_reply_link("Cancel Reply"); ?> </p> <?php comment_id_fields(); ?> <?php do_action('comment_form', $post->ID); ?> </fieldset> </form> <!-- End of form -->
" size="22" tabindex="3" /> </p> <?php } ?> <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?> </code></small></p>--> <p><textarea name="comment" id="comment" tabindex="4" rows="8"></textarea></p> <p><input name="submit" type="submit" id="submit" class="submit-comment" tabindex="5" value="Leave Comment" /> <?php cancel_comment_reply_link('<i class="icon-remove"></i> Nah, I changed my mind.'); ?> <?php comment_id_fields(); if ('cgc_images' == get_post_type()) { ?> <input type="hidden" name="cgc_object_redirect" value="<?php echo get_permalink(); ?> #comments"> <?php } else { ?> <input type="hidden" name="cgc_object_redirect" value="<?php echo get_permalink();
<div id="respond" class="<?php if (is_user_logged_in()) { echo "logged-in"; } ?> clearfix"> <h3><?php comment_form_title('Leave a comment (Gatorlink Required)', 'Leave a comment to %s (Gatorlink Required)'); ?> </h3> <div class="cancel-comment-reply"> <?php cancel_comment_reply_link(); ?> </div> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <p>You must be <a href="<?php echo wp_login_url(get_permalink()); ?> ">logged in</a> to post a comment.</p> <?php } else { ?> <form action="<?php
/** * Get comment form * * @since roen 1.0 */ function roen_comment_form() { global $user_identity; $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; if (comments_open()) { ?> <div id="respond"> <div id="reply-title" class="roen-title"> <h4 class="post-title"><?php comment_form_title(__('Leave A Comment', 'ROEN'), __('Leave A Comment', 'ROEN')); ?> </h4> <div class="line"><span class="left-line"></span><span class="right-line"></span></div> <div class="clear"></div> </div> <?php cancel_comment_reply_link(); ?> <form id="comment-form" action="<?php echo get_option('siteurl'); ?> /wp-comments-post.php" method="post"> <?php if (is_user_logged_in()) { ?> <p><?php _e('Logged in as', 'ROEN'); ?> <a href="<?php echo get_option('siteurl'); ?> /wp-admin/profile.php"><?php echo $user_identity; ?> </a>. <a href="<?php echo wp_logout_url(get_permalink()); ?> " title="Log out of this account"><?php _e('Log out »', 'ROEN'); ?> </a></p> <div id="comment-fields"> <div id="comment-textarea"> <label for="comment"><?php _e('Comment Message', 'ROEN'); ?> <span class="description"><?php _e('(required)', 'ROEN'); ?> </span></label> <textarea name="comment" id="comment" cols="60" rows="5" tabindex="4" class="textarea-comment logged-in"></textarea> </div> </div> <div id="comment-alert-error" class="alert alert-warning"> <span class="comment-alert-error-message"><?php _e('Please enter message.', 'ROEN'); ?> </span> </div> <div id="comment-submit"> <button type="submit" class="btn btn-theme float-btn no-margin"><i class="fa fa-comment-o"></i><?php _e('Post Comment', 'ROEN'); ?> </button> <?php comment_id_fields(); ?> <?php do_action('comment_form', get_the_ID()); ?> </div> <?php } else { ?> <div id="comment-fields"> <div id="comment-author"> <label for="author"><?php _e('Name', 'ROEN'); ?> <span class="description"><?php _e('(required)', 'ROEN'); ?> </span></label> <input type="text" name="author" id="author" tabindex="1" <?php if ($req) { echo "aria-required='true'"; } ?> class="input-name"> </div> <div id="comment-email"> <label for="email"><?php _e('Email', 'ROEN'); ?> <span class="description"><?php _e('(required)', 'ROEN'); ?> </span></label> <input type="text" name="email" id="email" tabindex="2" <?php if ($req) { echo "aria-required='true'"; } ?> class="input-email"> </div> <div id="comment-url"> <label for="url"><?php _e('Website', 'ROEN'); ?> </label> <input type="text" name="url" id="url" tabindex="3" class="input-website"> </div> <div id="comment-textarea"> <label for="comment"><?php _e('Comment Message', 'ROEN'); ?> <span class="description"><?php _e('(required)', 'ROEN'); ?> </span></label> <textarea name="comment" id="comment" cols="60" rows="5" tabindex="4" class="textarea-comment"></textarea> </div> </div> <div id="comment-alert-error" class="alert alert-warning"> <span class="comment-alert-error-name"><?php _e('Please enter your name.', 'ROEN'); ?> </span> <span class="comment-alert-error-email"><?php _e('Please enter an valid email address.', 'ROEN'); ?> </span> <span class="comment-alert-error-message"><?php _e('Please enter message.', 'ROEN'); ?> </span> </div> <div id="comment-submit"> <button type="submit" class="btn btn-theme float-btn no-margin"><i class="fa fa-comment-o"></i><?php _e('Post Comment', 'ROEN'); ?> </button> <?php comment_id_fields(); ?> <?php do_action('comment_form', get_the_ID()); ?> </div> <?php } ?> </form> </div> <?php } }
} ?> <?php } ?> <!-- End of dealing with the comments, now the comment form --> <?php if (comments_open()) { ?> <div id="respond"> <div class="cancel-comment-reply"> <?php cancel_comment_reply_link(__('Cancel', 'wptouch-pro')); ?> </div> <h3><?php comment_form_title(__('Leave a Reply', 'wptouch-pro'), __('Leave a Reply to %s', 'wptouch-pro')); ?> </h3> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <p><?php echo sprintf(__('You must be %slogged in%s to post a comment.', 'wptouch-pro'), '<a class="login-req" href="' . wp_login_url(get_permalink()) . '">', '</a>'); ?> </p>
/** My own comment design */ function romangie_magazin_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <div <?php comment_class('row new-comment'); ?> > <div id="li-comment-<?php comment_ID(); ?> "> <?php $posttype = get_comment_type(); if ($posttype == 'comment') { ?> <div class="meta col-sm-3 info"> <?php } else { ?> <div class="meta col-sm-4 info"> <?php } ?> <div id="comment-<?php comment_ID(); ?> "> <div class="comment-author vcard"> <?php $posttype = get_comment_type(); if ($posttype == 'comment') { ?> <div class="meta-item hidden-xs"><?php echo get_avatar($comment, $size = '48'); ?> </div> <div class="meta-item"><span data-icon="" class="info-icon"></span><?php echo get_comment_author_link(); ?> </div> <?php } else { ?> <div class="meta-item"><span data-icon="" class="info-icon"></span><?php echo get_comment_author_link(); ?> </div> <?php } ?> <div class="hidden-xs"> <div class="meta-item"><span data-icon="" class="info-icon"></span><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "><?php printf('%1$s', get_comment_date()); ?> </a></div> <div class="meta-item"><span data-icon="}" class="info-icon"></span><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "><?php printf('%1$s', get_comment_time()); ?> </a></div> </div> <?php if (is_admin()) { ?> <div class="meta-item"><div data-icon="l" class="info-icon"></div><?php edit_comment_link(__('(Edit)', 'romangie'), ' ', ''); ?> </div><?php } ?> <div class="meta-item"><?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'], 'add_below' => 'comment-content', 'reply_text' => '<span data-icon="J" class="info-icon"></span> ' . __('Reply', 'romangie')))); ?> </div> <?php cancel_comment_reply_link(); ?> </div> </div> </div> <?php $posttype = get_comment_type(); if ($posttype == 'comment') { ?> <div class="comment-content col-sm-9"> <?php } else { ?> <div class="comment-content col-sm-8"> <?php } ?> <?php if ($comment->comment_approved == '0') { ?> <div class="alert alert-warning" style="margin-top: -12px"><em style="font-size: 13px"><?php _e('Your comment is awaiting moderation.', 'romangie'); ?> </em></div> <?php } ?> <div id="comment-content-<?php comment_ID(); ?> "> <?php comment_text(); ?> </div> </div> </div> </div> <?php }
printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>'), allowed_tags()); ?> </small></p>--> <p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p> <?php /** This filter is documented in wp-includes/comment-template.php */ do_action('comment_form', $post->ID); ?> <p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php esc_attr_e('Submit Comment'); ?> " /> <?php comment_id_fields(); ?> </p> </form> <p class="cancel"><?php cancel_comment_reply_link('Cancelar Resposta'); ?> </p> </div> <?php } else { ?> <h3>Os comentários estão fechados.</h3> <?php } ?> </div>
/** * Customize comments form * *@return void *@since 1.0 **/ function oxy_comment_form($args = array(), $post_id = null) { global $user_identity, $id; if (null === $post_id) { $post_id = $id; } else { $id = $post_id; } $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; $fields = array('author' => '<div class="control-group"><div class="controls"><input id="author" name="author" placeholder="' . __('your name', THEME_FRONT_TD) . '" type="text" class="input-xlarge" value="' . esc_attr($commenter['comment_author']) . '"/></div></div>', 'email' => '<div class="control-group"><div class="controls"><input id="email" name="email" placeholder="' . __('your email address', THEME_FRONT_TD) . '" type="text" class="input-xlarge" value="' . esc_attr($commenter['comment_author_email']) . '" /></div></div>', 'url' => ''); $required_text = sprintf(' ' . __('Required fields are marked %s', THEME_FRONT_TD), '<span class="required"><a>*</a></span>'); $defaults = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<div class="control-group message"><div class="controls"><textarea id="comment" name="comment" placeholder="' . __('add your comment here ', THEME_FRONT_TD) . '" class="input-xxlarge" rows="3"></textarea></div></div>', 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', THEME_FRONT_TD), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</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>', THEME_FRONT_TD), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'comment_notes_before' => '', 'comment_notes_after' => '', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Add your comment', THEME_FRONT_TD), 'title_reply_to' => __('Leave a Reply', THEME_FRONT_TD), 'cancel_reply_link' => __('Cancel reply', THEME_FRONT_TD), 'label_submit' => __('Add comment', THEME_FRONT_TD)); $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults)); ?> <?php if (comments_open()) { ?> <?php do_action('comment_form_before'); ?> <div class="comments-form" id="respond"> <h3 id="reply-title" class="comment-form small-screen-center"><?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small id="cancel-comment-reply"><?php cancel_comment_reply_link('Cancel'); ?> </small></h3> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <?php echo $args['must_log_in']; ?> <?php do_action('comment_form_must_log_in_after'); ?> <?php } else { ?> <form action="<?php echo site_url('/wp-comments-post.php'); ?> " method="post" id="<?php echo esc_attr($args['id_form']); ?> "> <fieldset> <?php do_action('comment_form_top'); ?> <?php if (is_user_logged_in()) { ?> <?php echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity); ?> <?php do_action('comment_form_logged_in_after', $commenter, $user_identity); ?> <?php } else { ?> <?php echo $args['comment_notes_before']; ?> <?php do_action('comment_form_before_fields'); foreach ((array) $args['fields'] as $name => $field) { echo apply_filters('comment_form_field_' . $name, $field) . "\n"; } do_action('comment_form_after_fields'); ?> <?php } ?> <?php echo apply_filters('comment_form_field_comment', $args['comment_field']); ?> <?php echo $args['comment_notes_after']; ?> <div class="control-group"> <div class="controls small-screen-center"> <button name="submit" type="submit" class="btn btn-primary" id="<?php echo esc_attr($args['id_submit']); ?> " value="<?php echo esc_attr($args['label_submit']); ?> "><?php echo esc_attr($args['label_submit']); ?> </button> <?php comment_id_fields(); ?> </div> </div> <?php do_action('comment_form', $post_id); ?> </fieldset> </form> <?php } ?> </div><!-- #respond --> <?php do_action('comment_form_after'); ?> <?php } else { ?> <?php do_action('comment_form_comments_closed'); ?> <?php } ?> <?php }
/** * Function Name: origines_comment_form * Description: Custom comment form for bootstrap. */ function origines_comment_form($args = array(), $post_id = null) { global $id; if (null === $post_id) { $post_id = $id; } else { $id = $post_id; } $commenter = wp_get_current_commenter(); $user = wp_get_current_user(); $user_identity = $user->exists() ? $user->display_name : ''; $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; $fields = array('author' => '<label for="author">' . __('Name') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' />', 'email' => '<label for="email">' . __('Email') . ($req ? ' <span class="required">*</span>' : '') . '</label> ' . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' />', 'url' => '<label for="url">' . __('Website') . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" />'); $required_text = sprintf(' ' . __('Required fields are marked %s'), '<span class="required">*</span>'); $defaults = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<label for="comment">' . _x('Comment', 'noun') . '</label><textarea id="comment" name="comment" cols="45" rows="4" aria-required="true" class="span9"></textarea>', 'must_log_in' => '<span class="help-block must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</span>', 'logged_in_as' => '<span class="help-block 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>'), get_edit_user_link(), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</span>', 'comment_notes_before' => '<span class="help-block comment-notes">' . __('Your email address will not be published.') . ($req ? $required_text : '') . '</span>', 'comment_notes_after' => '<span class="help-block form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s'), ' <code>' . allowed_tags() . '</code>') . '</span>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Leave a Reply'), 'title_reply_to' => __('Leave a Reply to %s'), 'cancel_reply_link' => __('Cancel reply'), 'label_submit' => __('Post Comment')); $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults)); ?> <?php if (comments_open($post_id)) { ?> <?php do_action('comment_form_before'); ?> <div id="respond" class="row"> <form action="<?php echo site_url('/wp-comments-post.php'); ?> " method="post" id="<?php echo esc_attr($args['id_form']); ?> "> <fieldset class="span9"> <legend><?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small><?php cancel_comment_reply_link($args['cancel_reply_link']); ?> </small></legend> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <?php echo $args['must_log_in']; ?> <?php do_action('comment_form_must_log_in_after'); ?> <?php } else { ?> <?php do_action('comment_form_top'); ?> <?php if (is_user_logged_in()) { ?> <?php echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity); ?> <?php do_action('comment_form_logged_in_after', $commenter, $user_identity); ?> <?php } else { ?> <?php echo $args['comment_notes_before']; ?> <?php do_action('comment_form_before_fields'); foreach ((array) $args['fields'] as $name => $field) { echo apply_filters("comment_form_field_{$name}", $field) . "\n"; } do_action('comment_form_after_fields'); ?> <?php } ?> <?php echo apply_filters('comment_form_field_comment', $args['comment_field']); ?> <?php /* echo $args['comment_notes_after']; */ ?> <div class="form-actions"> <button type="submit" class="btn btn-primary" id="<?php echo esc_attr($args['id_submit']); ?> "><?php echo esc_attr($args['label_submit']); ?> </button> <?php comment_id_fields($post_id); ?> </div> <?php do_action('comment_form', $post_id); ?> <?php } ?> </fieldset> </form> </div> <!-- #respond --> <?php do_action('comment_form_after'); ?> <?php } else { ?> <?php do_action('comment_form_comments_closed'); ?> <?php } ?> <?php }
?> </ul> <?php } ?> <?php if ('open' == $post->comment_status) { ?> <div id="respond"> <hr/> <h4><?php _e("Comente", "tnb"); ?> <small><?php cancel_comment_reply_link(' Cancelar'); ?> </small></h4> <?php if (get_option('comment_registration') && !$user_ID) { ?> <p>Você precisa estar <a href="<?php print get_option('siteurl'); ?> /wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?> ">logado</a> para fazer um comentário.</p> <?php
<?php do_action('comment_form_before'); ?> <div id="respond"> <h3 id="reply-title"><?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small><?php cancel_comment_reply_link($args['cancel_reply_link']); ?> </small></h3> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <?php echo $args['must_log_in']; ?> <?php do_action('comment_form_must_log_in_after'); ?> <?php } else { ?> <form action="<?php echo site_url('/wp-comments-post.php'); ?> " method="post" id="<?php echo esc_attr($args['id_form']); ?> ">
">logged in</a> to post a comment.</p> <?php } else { // else show the form ?> <form id="comment-form" action="<?php echo esc_attr(get_option('siteurl')); ?> /wp-comments-post.php" method="post"> <h3><?php comment_form_title(__('Post Your Comment'), __('Reply to %s')); ?> </h3> <p id="cancel-comment-reply"><?php cancel_comment_reply_link('Cancel Reply'); ?> </p> <?php if ($user_ID) { ?> <div class="self"><?php printf(__('Logged in as <a href="%1$s">%2$s</a>. <a class="logout" href="%3$s">Log out?</a>', 'mozhacks'), admin_url('profile.php'), esc_html($user_identity), wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))); ?> </div> <?php } else { ?> <div class="field" id="cmt-name"> <label for="author"><?php _e('Your name', 'mozhacks');
/** * returns the formatted form of the comments * * @param array $args an array of arguments to be filtered * @param int $post_id if form is called within the loop then post_id is optional * * @return string Return the comment form */ function sh_comment_form($args = array(), $post_id = null, $review = false) { if (null === $post_id) { $post_id = get_the_ID(); } else { $id = $post_id; } $commenter = wp_get_current_commenter(); $user = wp_get_current_user(); $user_identity = $user->exists() ? $user->display_name : ''; $args = wp_parse_args($args); if (!isset($args['format'])) { $args['format'] = current_theme_supports('html5', 'comment-form') ? 'html5' : 'xhtml'; } $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; $html5 = 'html5' === $args['format']; $fields = array('author' => '<div class="col-md-6"><div class="form-group"><input id="author" placeholder="' . esc_html__('Name', SH_NAME) . '" class="form-control" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></div></div>', 'email' => '<div class="col-md-6"><div class="form-group"><input id="email" placeholder="' . esc_html__('Email', SH_NAME) . '" class="form-control" name="email" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></div></div>'); $required_text = sprintf(' ' . esc_html__('Required fields are marked %s', SH_NAME), '<span class="required">*</span>'); /** * Filter the default comment form fields. * * @since 3.0.0 * * @param array $fields The default comment fields. */ $fields = apply_filters('comment_form_default_fields', $fields); $defaults = array('fields' => $fields, 'comment_field' => '<div class="col-md-12"><div class="form-group"><textarea id="comment" placeholder="' . esc_html__('Comment', SH_NAME) . '" class="form-control" name="comment" cols="45" rows="8" aria-required="true"></textarea></div></div>', 'must_log_in' => '<p class="col-md-12 col-sm-12">' . sprintf(esc_html__('You must be <a href="%s">logged in</a> to post a comment.', SH_NAME), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'logged_in_as' => '<p class="col-md-12 col-sm-12">' . sprintf(esc_html__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', SH_NAME), get_edit_user_link(), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'comment_notes_before' => '<p class="col-md-12 col-sm-12">' . esc_html__('Your email address will not be published.', SH_NAME) . ($req ? $required_text : '') . '</p>', 'comment_notes_after' => '<p class="col-md-12 col-sm-12">' . sprintf(esc_html__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', SH_NAME), ' <code>' . allowed_tags() . '</code>') . '</p>', 'id_form' => 'comments_form', 'id_submit' => 'submit', 'title_reply' => esc_html__('Leave a Reply', SH_NAME), 'title_reply_to' => esc_html__('Leave a Reply to %s', SH_NAME), 'cancel_reply_link' => esc_html__('Cancel reply', SH_NAME), 'label_submit' => esc_html__('Send', SH_NAME), 'format' => 'xhtml'); /** * Filter the comment form default arguments. * * Use 'comment_form_default_fields' to filter the comment fields. * * @since 3.0.0 * * @param array $defaults The default comment form arguments. */ $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults)); ?> <?php if (comments_open($post_id)) { ?> <?php /** * Fires before the comment form. * * @since 3.0.0 */ do_action('comment_form_before'); ?> <div id="respond" class="comment-respond"> <div class="post-header"> <div class="uppercase no-margin h2"><?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small><?php cancel_comment_reply_link($args['cancel_reply_link']); ?> </small></div> </div> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <?php echo blanaceTags($args['must_log_in']); ?> <?php /** * Fires after the HTML-formatted 'must log in after' message in the comment form. * * @since 3.0.0 */ do_action('comment_form_must_log_in_after'); ?> <?php } else { ?> <form action="<?php echo site_url('/wp-comments-post.php'); ?> " method="post" id="<?php echo esc_attr($args['id_form']); ?> " class="row"<?php echo esc_attr($html5) ? ' novalidate' : ''; ?> > <?php /** * Fires at the top of the comment form, inside the <form> tag. * * @since 3.0.0 */ do_action('comment_form_top'); ?> <?php if (is_user_logged_in()) { ?> <?php /** * Filter the 'logged in' message for the comment form for display. * * @since 3.0.0 * * @param string $args['logged_in_as'] The logged-in-as HTML-formatted message. * @param array $commenter An array containing the comment author's username, email, and URL. * @param string $user_identity If the commenter is a registered user, the display name, blank otherwise. */ echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity); ?> <?php /** * Fires after the is_user_logged_in() check in the comment form. * * @since 3.0.0 * * @param array $commenter An array containing the comment author's username, email, and URL. * @param string $user_identity If the commenter is a registered user, the display name, blank otherwise. */ do_action('comment_form_logged_in_after', $commenter, $user_identity); ?> <?php } else { ?> <?php echo balanceTags($args['comment_notes_before']); ?> <?php /** * Fires before the comment fields in the comment form. * * @since 3.0.0 */ do_action('comment_form_before_fields'); foreach ((array) $args['fields'] as $name => $field) { /** * Filter a comment form field for display. * * The dynamic portion of the filter hook, $name, refers to the name * of the comment form field. Such as 'author', 'email', or 'url'. * * @since 3.0.0 * * @param string $field The HTML-formatted output of the comment form field. */ echo apply_filters("comment_form_field_{$name}", $field) . "\n"; } /** * Fires after the comment fields in the comment form. * * @since 3.0.0 */ do_action('comment_form_after_fields'); ?> <?php } ?> <?php /** * Filter the content of the comment textarea field for display. * * @since 3.0.0 * * @param string $args['comment_field'] The content of the comment textarea field. */ echo apply_filters('comment_form_field_comment', $args['comment_field']); ?> <div class="clearfix"></div> <?php echo balanceTags($args['comment_notes_after']); ?> <div class="col-md-12"> <input name="submit" type="submit" class="btn btn-primary pull-left" id="<?php echo esc_attr($args['id_submit']); ?> " value="<?php echo esc_attr($args['label_submit']); ?> " /> <?php comment_id_fields($post_id); ?> </div> <?php /** * Fires at the bottom of the comment form, inside the closing </form> tag. * * @since 1.5.2 * * @param int $post_id The post ID. */ do_action('comment_form', $post_id); ?> </form> <?php } ?> </div><!-- #respond --> <?php /** * Fires after the comment form. * * @since 3.0.0 */ do_action('comment_form_after'); } else { /** * Fires after the comment form if comments are closed. * * @since 3.0.0 */ do_action('comment_form_comments_closed'); } }
?> ') this.value = '';" onblur="if (this.value == '') {this.value = '<?php _e('name', 'magazine01'); ?> ';}" value="<?php _e('name', 'magazine01'); ?> " tabindex="2" /> <input type="text" name="email" id="email" onfocus="if (this.value == 'email') this.value = '';" onblur="if (this.value == '') {this.value = 'email';}" value="email" tabindex="3" /> <input type="text" name="url" id="url" value="http://" tabindex="4" /> <?php } ?> <?php cancel_comment_reply_link(__('cancel', 'magazine01')); ?> <input type="submit" name="comentar" id="comentar" value="<?php _e('Comment', 'magazine01'); ?> " /> <?php if (get_option("comment_moderation") == "1") { ?> <?php _e('All comments need to be approved', 'magazine01'); ?> <?php } ?> <?php
/** * Comment form */ function zee_comment_form($args = array(), $post_id = null) { if (null === $post_id) { $post_id = get_the_ID(); } else { $id = $post_id; } $commenter = wp_get_current_commenter(); $user = wp_get_current_user(); $user_identity = $user->exists() ? $user->display_name : ''; if (!isset($args['format'])) { $args['format'] = current_theme_supports('html5', 'comment-form') ? 'html5' : 'xhtml'; } $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; $html5 = 'html5' === $args['format']; $fields = array('author' => ' <div class="form-group"> <div class="col-sm-6 comment-form-author"> <input class="form-control" id="author" placeholder="' . __('Name', ZEETEXTDOMAIN) . '" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" ' . $aria_req . ' /> </div>', 'email' => '<div class="col-sm-6 comment-form-email"> <input id="email" class="form-control" name="email" placeholder="' . __('Email', ZEETEXTDOMAIN) . '" ' . ($html5 ? 'type="email"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_email']) . '" ' . $aria_req . ' /> </div> </div>', 'url' => '<div class="form-group"> <div class=" col-sm-12 comment-form-url">' . '<input class="form-control" placeholder="' . __('Website', ZEETEXTDOMAIN) . '" id="url" name="url" ' . ($html5 ? 'type="url"' : 'type="text"') . ' value="' . esc_attr($commenter['comment_author_url']) . '" /> </div></div>'); $required_text = sprintf(' ' . __('Required fields are marked %s', ZEETEXTDOMAIN), '<span class="required">*</span>'); $defaults = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => ' <div class="form-group comment-form-comment"> <div class="col-sm-12"> <textarea class="form-control" id="comment" name="comment" placeholder="' . _x('Comment', 'noun', ZEETEXTDOMAIN) . '" rows="8" aria-required="true"></textarea> </div> </div> ', 'must_log_in' => ' <div class="alert alert-danger must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</div>', 'logged_in_as' => '<div class="alert alert-info 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>', ZEETEXTDOMAIN), get_edit_user_link(), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</div>', 'comment_notes_before' => '<div class="alert alert-info comment-notes">' . __('Your email address will not be published.', ZEETEXTDOMAIN) . ($req ? $required_text : '') . '</div>', 'comment_notes_after' => '<div class="form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', ZEETEXTDOMAIN), ' <code>' . allowed_tags() . '</code>') . '</div>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Leave a Reply', ZEETEXTDOMAIN), 'title_reply_to' => __('Leave a Reply to %s', ZEETEXTDOMAIN), 'cancel_reply_link' => __('Cancel reply', ZEETEXTDOMAIN), 'label_submit' => __('Post Comment', ZEETEXTDOMAIN), 'format' => 'xhtml'); $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults)); if (comments_open($post_id)) { ?> <?php do_action('comment_form_before'); ?> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title"> <?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small><?php cancel_comment_reply_link($args['cancel_reply_link']); ?> </small> </h3> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <?php echo $args['must_log_in']; ?> <?php do_action('comment_form_must_log_in_after'); ?> <?php } else { ?> <form action="<?php echo site_url('/wp-comments-post.php'); ?> " method="post" id="<?php echo esc_attr($args['id_form']); ?> " class="form-horizontal comment-form"<?php echo $html5 ? ' novalidate' : ''; ?> role="form"> <?php do_action('comment_form_top'); ?> <?php if (is_user_logged_in()) { ?> <?php echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity); ?> <?php do_action('comment_form_logged_in_after', $commenter, $user_identity); ?> <?php } else { ?> <?php echo $args['comment_notes_before']; ?> <?php do_action('comment_form_before_fields'); foreach ((array) $args['fields'] as $name => $field) { echo apply_filters("comment_form_field_{$name}", $field) . "\n"; } do_action('comment_form_after_fields'); } echo apply_filters('comment_form_field_comment', $args['comment_field']); echo $args['comment_notes_after']; ?> <div class="form-submit"> <input class="btn btn-danger btn-lg" name="submit" type="submit" id="<?php echo esc_attr($args['id_submit']); ?> " value="<?php echo esc_attr($args['label_submit']); ?> " /> <?php comment_id_fields($post_id); ?> </div> <?php do_action('comment_form', $post_id); ?> </form> <?php } ?> </div><!-- #respond --> <?php do_action('comment_form_after'); } else { do_action('comment_form_comments_closed'); } }
</div> <?php } ?> <?php if ('open' == $post->comment_status) { ?> <div id="respond"> <h3 id="respondTitle"><span class="hook"><?php comment_form_title('Leave a Reply', 'Leave a Reply to %s'); ?> <span class="cancel-comment-reply"><?php cancel_comment_reply_link('× Cancel reply'); ?> </span></span></h3> <?php if (get_option('comment_registration') && !$user_ID) { ?> <p>You must be <a href="<?php echo get_option('siteurl'); ?> /wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?> ">logged in</a> to post a comment.</p> <?php } else {
<div id="respond-p<?php echo $post->ID; ?> "> <form action="<?php echo trailingslashit(get_bloginfo('wpurl')); ?> wp-comments-post.php" method="post" class="comment-form"> <p class="comment-form-comment tight"> <label class="h3" for="comment-p<?php echo $post->ID; ?> "><?php if (function_exists('comment_form_title')) { comment_form_title(); echo ' <em id="cancel-comment-reply">', cancel_comment_reply_link(), '</em>'; } else { _e('Post a comment', 'carrington-text'); } ?> </label> <br class="lofi" /> <span class="comment-form-comment-area"> <textarea id="comment-p<?php echo $post->ID; ?> " name="comment" rows="8" cols="40"></textarea><br /> <em class="some-html-is-ok"><abbr title="<?php printf(__('You can use: %s', 'carrington-text'), allowed_tags()); ?> "><?php
function m18pud_comment_form($args = array(), $post_id = null) { global $user_identity, $id; if (null === $post_id) { $post_id = $id; } else { $id = $post_id; } $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); $aria_req = $req ? " aria-required='true'" : ''; $fields = array('author' => '<p class="comment-form-author">' . '<label for="author">' . ($req ? '<span class="required">*</span>' . __('名 称') . '</label> ' : '') . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . ($req ? '<span class="required">*</span>' . __('Email') . '</label> ' : '') . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></p>', 'url' => '<p class="comment-form-url"><label for="url">' . __('网 站') . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></p>'); $required_text = sprintf(' ' . __('Required fields are marked %s'), '<span class="required">*</span>'); $defaults = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . '<span class="required">*</span>' . _x('评 论', 'noun') . '</label><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.'), wp_login_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</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>'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id)))) . '</p>', 'comment_notes_before' => '<p class="comment-notes">' . __('Your email address will not be published.') . ($req ? $required_text : '') . '</p>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => __('Leave a Reply'), 'title_reply_to' => __('Leave a Reply to %s'), 'cancel_reply_link' => __('Cancel reply'), 'label_submit' => __('Post Comment')); $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults)); ?> <?php if (comments_open()) { ?> <?php do_action('comment_form_before'); ?> <div id="respond"> <h3 id="reply-title"><?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small><?php cancel_comment_reply_link($args['cancel_reply_link']); ?> </small></h3> <?php if (get_option('comment_registration') && !is_user_logged_in()) { ?> <?php echo $args['must_log_in']; ?> <?php do_action('comment_form_must_log_in_after'); ?> <?php } else { ?> <form action="<?php echo site_url('/wp-comments-post.php'); ?> " method="post" id="<?php echo esc_attr($args['id_form']); ?> "> <?php do_action('comment_form_top'); ?> <?php if (is_user_logged_in()) { ?> <?php echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity); ?> <?php do_action('comment_form_logged_in_after', $commenter, $user_identity); ?> <?php } else { ?> <?php echo $args['comment_notes_before']; ?> <?php do_action('comment_form_before_fields'); foreach ((array) $args['fields'] as $name => $field) { echo apply_filters("comment_form_field_{$name}", $field) . "\n"; } do_action('comment_form_after_fields'); ?> <?php } ?> <?php echo apply_filters('comment_form_field_comment', $args['comment_field']); ?> <?php echo $args['comment_notes_after']; ?> <p class="form-submit"> <input name="submit" type="submit" id="<?php echo esc_attr($args['id_submit']); ?> " value="<?php echo esc_attr($args['label_submit']); ?> " /> <?php comment_id_fields(); ?> </p> <?php do_action('comment_form', $post_id); ?> </form> <?php } ?> </div><!-- #respond --> <?php do_action('comment_form_after'); ?> <?php } else { ?> <?php do_action('comment_form_comments_closed'); ?> <?php } ?> <?php }