当前位置: 首页>>代码示例>>PHP>>正文


PHP comment_id_fields函数代码示例

本文整理汇总了PHP中comment_id_fields函数的典型用法代码示例。如果您正苦于以下问题:PHP comment_id_fields函数的具体用法?PHP comment_id_fields怎么用?PHP comment_id_fields使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了comment_id_fields函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fields

 public function fields()
 {
     global $post;
     comment_id_fields($this->post_id);
     do_action('comment_form', $post->ID);
 }
开发者ID:lukesmmr,项目名称:lowconstrutores,代码行数:6,代码来源:PeThemeComments.php

示例2: thematic_legacy_comment_form


//.........这里部分代码省略.........
</p>
	
                    <div id="form-section-author" class="form-section">
						<div class="form-label"><label for="author"><?php 
            _e('Name', 'thematic');
            ?>
</label> <?php 
            if ($req) {
                _e('<span class="required">*</span>', 'thematic');
            }
            ?>
</div>
						<div class="form-input"><input id="author" name="author" type="text" value="<?php 
            echo $comment_author;
            ?>
" size="30" maxlength="20" tabindex="3" /></div>
                    </div><!-- #form-section-author .form-section -->
	
                    <div id="form-section-email" class="form-section">
						<div class="form-label"><label for="email"><?php 
            _e('Email', 'thematic');
            ?>
</label> <?php 
            if ($req) {
                _e('<span class="required">*</span>', 'thematic');
            }
            ?>
</div>
						<div class="form-input"><input id="email" name="email" type="text" value="<?php 
            echo $comment_author_email;
            ?>
" size="30" maxlength="50" tabindex="4" /></div>
                    </div><!-- #form-section-email .form-section -->
	
                    <div id="form-section-url" class="form-section">
						<div class="form-label"><label for="url"><?php 
            _e('Website', 'thematic');
            ?>
</label></div>
						<div class="form-input"><input id="url" name="url" type="text" value="<?php 
            echo $comment_author_url;
            ?>
" size="30" maxlength="50" tabindex="5" /></div>
	                </div><!-- #form-section-url .form-section -->
	
				<?php 
        }
        ?>
	
	            <div id="form-section-comment" class="form-section">
					<div class="form-label"><label for="comment"><?php 
        _e(thematic_commentbox_text(), 'thematic');
        ?>
</label></div>
	    			<div class="form-textarea"><textarea id="comment" name="comment" cols="45" rows="8" tabindex="6"></textarea></div>
	            </div><!-- #form-section-comment .form-section -->
	                            
                <div id="form-allowed-tags" class="form-section">
                    <p><span><?php 
        printf(_x('You may use these %1$sHTML%2$s tags and attributes', '%$1s and %$2s are <abbr> tags', 'thematic'), '<abbr title="HyperText Markup Language">', '</abbr>');
        ?>
</span> <code><?php 
        echo allowed_tags();
        ?>
</code></p>
                </div>
								
       			<?php 
        do_action('comment_form', $post->ID);
        ?>
	                  
				<div class="form-submit"><input id="submit" name="submit" type="submit" value="<?php 
        echo thematic_commentbutton_text();
        ?>
" tabindex="7" /><input type="hidden" name="comment_post_ID" value="<?php 
        echo $id;
        ?>
" /></div>
	
                <?php 
        comment_id_fields();
        ?>
    
	
			</form><!-- #commentform -->
	
			<?php 
        // action hook for inserting content below #commentform
        thematic_belowcommentsform();
        ?>
	
		</div><!-- .formcontainer -->
		<?php 
    }
    ?>
		
	</div><!-- #respond -->
	
<?php 
}
开发者ID:scottnix,项目名称:Thematic,代码行数:101,代码来源:deprecated.php

示例3: comment_form


//.........这里部分代码省略.........
            do_action('comment_form_must_log_in_after');
            ?>
				<?php 
        } else {
            ?>
					<form action="<?php 
            echo site_url('/wp-comments-post.php');
            ?>
" method="post" enctype="multipart/form-data" 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'];
            ?>

						<?php 
            global $ATT_MAX;
            //$required = ATT_REQ ? ' <span class="required">*</span>' : '';
            global $region;
            if ($ATT_MAX == "") {
                $ATT_MAX = 2;
            }
            #if ($region != "de")
            echo '
                                                        <p class="comment-form-url comment-form-attachment">

                                                            <label for="attachment">' . $txt_att_attachment . '</label>
					                    <input id="attachment" name="attachment" type="file" /><br />
                                                            <span style="margin-left:150px;">
                                                               ' . $txt_att_filetypes . ': <strong>txt, jpg, png, gif</strong>, ' . $txt_att_maxsize . ': ' . $ATT_MAX . 'MB.
                                                            </span>
                                                        </p>';
            ?>

						<p class="form-submit">
							<button name="submit_comments" type="submit" value="<?php 
            echo esc_attr($args['label_submit']);
            ?>
" ><?php 
            echo esc_attr($args['label_submit']) . '&nbsp;<i class="icon-arrow-right icon-button"></i>';
            ?>
</button>
							<?php 
            comment_id_fields($post_id);
            ?>
						</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 
}
开发者ID:cptpike,项目名称:linuxhardwareguide,代码行数:101,代码来源:comment-template.php

示例4: wp_comment_form


//.........这里部分代码省略.........
            } 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";
                    }
                    ?>
							<?php 
                }
                ?>
							<?php 
                echo apply_filters('comment_form_field_comment', $args['comment_field']);
                ?>
							<?php 
                echo $args['comment_notes_after'];
                ?>
							<?php 
                if (!is_user_logged_in()) {
                    do_action('comment_form_after_fields');
                }
                ?>
							<p class="form-submit">
								<button class="button" type="submit" id="<?php 
                echo esc_attr($args['id_submit']);
                ?>
"><span><span><?php 
                echo esc_attr($args['label_submit']);
                ?>
</span></span></button>

								<?php 
                comment_id_fields($post_id);
                ?>
							</p>
							<?php 
                do_action('comment_form', $post_id);
                ?>
						</form>
					<?php 
            }
            ?>
				</div><!-- #respond -->
				<?php 
            do_action('comment_form_after');
            ?>
				<script type="text/javascript">
				//<![CDATA[
					jQuery('#commentform').find('input').focus(function() {
						if(jQuery(this).val() == jQuery(this).attr('defaultvalue'))
							jQuery(this).val('');
					}).blur(function() {
						if(jQuery(this).val() == '')
							jQuery(this).val(jQuery(this).attr('defaultvalue'));
					});
					jQuery('#commentform').submit(function() {
						jQuery(this).find('input').each(function(input){
							if(jQuery(this).val() == jQuery(this).attr('defaultvalue'))
								jQuery(this).val('');
						});	
						return true;
					});
				//]]>	
				</script>
			<?php 
        } else {
            ?>
				<?php 
            do_action('comment_form_comments_closed');
            ?>
			<?php 
        }
        ?>
		<?php 
    }
开发者ID:proj-2014,项目名称:vlan247-test-wp2,代码行数:101,代码来源:comment.php

示例5: apply_filters

        }
        ?>
                                <div class="clear"></div>
                                <?php 
        echo apply_filters('comment_form_field_comment', $args['comment_field']);
        ?>
                                <div class="form-submit">
                                    <input name="submit" type="submit" id="submit" value="<?php 
        _e('Submit Comment', OP_P_SN);
        ?>
" class="silver-button" /> <p>* <?php 
        _e('Denotes Required Field', OP_P_SN);
        ?>
</p>
                                    <?php 
        comment_id_fields($post_id);
        ?>
                                </div>
                                <?php 
        do_action('comment_form', $post_id);
        ?>
                            </form>
                        <?php 
    }
    ?>
                    </div>
                    <?php 
} else {
    ?>
                        <?php 
    do_action('comment_form_comments_closed');
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:comments.php

示例6: comment_form_tm


//.........这里部分代码省略.........
                     * @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');
                    /**
                     * 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'];
                if (!is_user_logged_in()) {
                    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";
                    }
                }
                ?>

						<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($post_id);
                ?>
						</p>
						<?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');
        }
    }
开发者ID:hamednourhani,项目名称:naiau.ir,代码行数:101,代码来源:theme-core.php

示例7: get_option

    <?php else : ?>

   	<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

	<?php if ( $user_ID ) : ?>
			
	<p class="logged">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="Log out of this account">Log out &raquo;</a></p>
			
	<?php else : ?>
			
	<p><input type="text" class="textfield" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /><label  class="textfield_label" for="author"><?php echo _e('Name *', 'epanel'); ?></label></p>
			
	<p><input type="text" class="textfield" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /><label class="textfield_label" for="email"><?php echo _e('Email *', 'epanel');?></label></p>
			
	<p><input type="text" class="textfield" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /><label  class="textfield_label" for="url"><?php echo _e('Website', 'epanel');?></label></p>
			
	<?php endif; ?>
			
	<p><textarea class="textarea" name="comment" id="comment" cols="70" rows="10" tabindex="4"></textarea></p>

	<p><input type="submit" class="button" value="<?php echo _e('Submit Comment', 'epanel');?>" /><?php comment_id_fields(); ?></p>
		    
	<?php do_action('comment_form', $post->ID); ?>
	
	</form>
	
<?php endif; ?>

</div><!--/respond-->

<?php endif; ?>
开发者ID:robbiespire,项目名称:paQui,代码行数:31,代码来源:comments.php

示例8: cp_main_comment_form


//.........这里部分代码省略.........
            $req = get_option('require_name_email');
            ?>

                    <p class="comments">
                        <label for="author"><?php 
            _e('Name', APP_TD);
            ?>
 <?php 
            if ($req) {
                _e('(required)', APP_TD);
            }
            ?>
</label>
                        <input type="text" name="author" id="author" class="text required" value="<?php 
            echo esc_attr($commenter['comment_author']);
            ?>
" size="22" tabindex="1" />
                    </p>
    
                    <div class="clr"></div>
    
                    <p class="comments">
                        <label for="email"><?php 
            _e('Email (will not be visible)', APP_TD);
            ?>
 <?php 
            if ($req) {
                _e('(required)', APP_TD);
            }
            ?>
</label>
                        <input type="text" name="email" id="email" class="text required email" value="<?php 
            echo esc_attr($commenter['comment_author_email']);
            ?>
" size="22" tabindex="2" />                                
                    </p>
    
                    <div class="clr"></div>
    
                   <p class="comments">
                        <label for="url"><?php 
            _e('Website', APP_TD);
            ?>
</label>
                        <input type="text" name="url" id="url" class="text" value="<?php 
            echo esc_attr($commenter['comment_author_url']);
            ?>
" size="22" tabindex="3" />
                    </p>
    
                   <div class="clr"></div>

                <?php 
        }
        ?>
                
                <!--<li><small><strong>XHTML:</strong> You can use these tags: <?php 
        echo allowed_tags();
        ?>
</small><div class="clr"></div></li>-->

                <p class="comments-box">
                    <textarea name="comment" rows="" cols="" id="comment" class="required" tabindex="4"></textarea>
                </p>

                <div class="clr"></div>

                <p class="comments">
                    <input name="submit" type="submit" id="submit" tabindex="5" class="btn_orange" value="<?php 
        _e('Leave a Reply', APP_TD);
        ?>
" />
                    <input type="hidden" name="comment_post_ID" value="<?php 
        echo $post->ID;
        ?>
" />
                </p>

                <?php 
        comment_id_fields();
        ?>
                <?php 
        do_action('comment_form', $post->ID);
        ?>

                 </fieldset>
                
            </form>

        <?php 
    }
    // if logged in
    ?>

        <div class="clr"></div>

    </div> <!-- /respond -->

<?php 
}
开发者ID:kalushta,项目名称:darom,代码行数:101,代码来源:theme-comments.php

示例9: quality_ticket_form


//.........这里部分代码省略.........
		
			<legend><?php 
    echo esc_attr($args['basic_fields']['label']);
    ?>
</legend>
		
			<?php 
    do_action('ticket_form_before_basic_fields');
    foreach ($args['basic_fields']['fields'] as $name => $field) {
        echo apply_filters("ticket_form_field_{$name}", $field) . "\n";
    }
    do_action('ticket_form_after_basic_fields');
    ?>
			
		</fieldset>
		
		<fieldset id="<?php 
    echo esc_attr($args['advanced_fields']['id']);
    ?>
">
			
			<legend><?php 
    echo esc_attr($args['advanced_fields']['label']);
    ?>
</legend>
		
			<?php 
    do_action('ticket_form_before_advanced_fields');
    foreach ($args['advanced_fields']['fields'] as $name => $field) {
        echo apply_filters("ticket_form_field_{$name}", $field) . "\n";
    }
    do_action('ticket_form_after_advanced_fields');
    ?>
		
		</fieldset>
		
		<fieldset id="<?php 
    echo esc_attr($args['meta_fields']['id']);
    ?>
">
			
			<legend><?php 
    echo esc_attr($args['meta_fields']['label']);
    ?>
</legend>
		
			<?php 
    do_action('ticket_form_before_meta_fields');
    foreach ($args['meta_fields']['fields'] as $name => $field) {
        echo apply_filters("ticket_form_field_{$name}", $field) . "\n";
    }
    do_action('ticket_form_after_meta_fields');
    ?>
		
		</fieldset>
		
		<?php 
    do_action('ticket_form_after_fields');
    ?>
		
		<p id="ticket-create">
		
			<?php 
    if ($args['location'] == 'page') {
        ?>
				<input type="hidden" name="create_ticket" value="proccess" />
			<?php 
    } else {
        ?>
				<?php 
        do_action('comment_form', $post->ID);
        ?>
				<?php 
        comment_id_fields();
        ?>
			<?php 
    }
    ?>
			
			<input type="submit" name="submit" id="<?php 
    echo esc_attr($args['id_submit']);
    ?>
" value="<?php 
    echo esc_attr($args['label_submit']);
    ?>
" />
		</p>
		
		<?php 
    do_action('ticket_form_bottom');
    ?>
		
	</form>
	
	<?php 
    do_action('ticket_form_after');
    ?>

<?php 
}
开发者ID:jshwlkr,项目名称:Quality-Control,代码行数:101,代码来源:tickets.php

示例10: dt_comment_form


//.........这里部分代码省略.........
                                  <div class="form-group col-xs-12">
                                    <textarea class="form-control" rows="3" name="comment" id="comment" placeholder="' . __('your message', 'Krypton') . '" required></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.', 'Krypton'), 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>', 'Krypton'), 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">' . __('Your email address will not be published.', 'Krypton') . ($req ? $required_text : '') . '</p>', 'comment_notes_after' => '', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => '<hr /><div class="col-sm-12 comment-leave-title">' . __('Leave a Comment', 'Krypton') . '</div><hr />', 'title_reply_to' => __('Leave a Comment to %s', 'Krypton'), 'cancel_reply_link' => __('Cancel reply', 'Krypton'), 'label_submit' => __('Submit', 'Krypton'), 'format' => 'html5');
    $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults));
    ?>
    <?php 
    if (comments_open($post_id)) {
        ?>

      <?php 
        do_action('comment_form_before');
        ?>
      <section 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="comment-form"<?php 
            echo $html5 ? ' novalidate' : '';
            ?>
 data-abide>
            <?php 
            do_action('comment_form_top');
            ?>
            <?php 
            if (is_user_logged_in()) {
                echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity);
                do_action('comment_form_logged_in_after', $commenter, $user_identity);
                echo $args['comment_notes_before'];
            } else {
                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 
            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($post_id);
            ?>
            </p>
            <?php 
            do_action('comment_form', $post_id);
            ?>
          </form>
        <?php 
        }
        ?>
      </section><!-- #respond -->
      <?php 
        do_action('comment_form_after');
        ?>
    <?php 
    } else {
        ?>
      <?php 
        do_action('comment_form_comments_closed');
        ?>
    <?php 
    }
    ?>
  <?php 
}
开发者ID:estrategasdigitales,项目名称:Dagutorio,代码行数:101,代码来源:custom_functions.php

示例11: toolbox_comment_form

/**
 * Outputs 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
 * @param array $args Options for strings, fields etc in the form
 * @param mixed $post_id Post ID to generate the form for, uses the current post if null
 * @return void
 */
function toolbox_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 = !empty($user->ID) ? $user->display_name : '';
    $req = get_option('require_name_email');
    $aria_req = $req ? " aria-required='true' required='required'" : '';
    $class_req = $req ? ' required' : '';
    $fields = array('author' => '<p class="comment-form-author' . $class_req . '">' . '<label for="author">' . __('Name') . ' </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' . $class_req . '">' . '<label for="email">' . __('Email') . ' </label>' . '<input id="email" name="email" type="email" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></p>', 'url' => '<p class="comment-form-url">' . '<label for="url">' . __('Website') . ' </label>' . '<input id="url" name="url" type="url" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></p>');
    $defaults = array('fields' => apply_filters('comment_form_default_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>'), 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.') . '</p>', 'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s'), ' <code>' . allowed_tags() . '</code>') . '</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));
    if (comments_open()) {
        do_action('comment_form_before');
        echo '<div id="respond">';
        echo '<h3 id="reply-title">';
        comment_form_title($args['title_reply'], $args['title_reply_to']);
        echo ' <small>';
        cancel_comment_reply_link($args['cancel_reply_link']);
        echo '</small></h3>';
        if (get_option('comment_registration') && !is_user_logged_in()) {
            echo $args['must_log_in'];
            do_action('comment_form_must_log_in_after');
        } else {
            echo '<form action="' . site_url('/wp-comments-post.php') . '" method="post" id="' . esc_attr($args['id_form']) . '">';
            do_action('comment_form_top');
            if (is_user_logged_in()) {
                echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity);
                do_action('comment_form_logged_in_after', $commenter, $user_identity);
            } else {
                echo $args['comment_notes_before'];
                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'];
            echo '<p class="form-submit">';
            echo '<button name="submit" value="submit" id="' . esc_attr($args['id_submit']) . '">' . esc_attr($args['label_submit']) . '</button>';
            comment_id_fields($post_id);
            echo '</p>';
            do_action('comment_form', $post_id);
            echo '</form>';
        }
        echo '</div>';
        do_action('comment_form_after');
    } else {
        do_action('comment_form_comments_closed');
    }
}
开发者ID:neapel,项目名称:wp-theme-green,代码行数:71,代码来源:functions.php

示例12: form

    function form()
    {
        global $thesis_site;
        if (comments_open()) {
            #wp
            global $user_ID, $user_identity;
            if (get_option('comment_registration') && !$user_ID) {
                // If registration is required and the user is NOT logged in... #wp
                echo "\t\t\t\t<div class=\"login_alert\">\n";
                echo "\t\t\t\t\t<p>" . sprintf(__('You must <a href="%s" rel="nofollow">log in</a> to post a comment.', 'thesis'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())) . "</p>\n";
                #wp
                echo "\t\t\t\t</div>\n";
            } else {
                // Otherwise, show the user the stinkin' comment form already!
                echo "\t\t\t\t<div id=\"respond\">\n";
                echo "\t\t\t\t\t<div id=\"respond_intro\">\n";
                if (get_option('thread_comments')) {
                    cancel_comment_reply_link(__('Cancel reply', 'thesis'));
                }
                #wp
                echo "\t\t\t\t\t\t<p>" . apply_filters('thesis_comment_form_title', __('Leave a Comment', 'thesis')) . "</p>\n";
                #filter
                echo "\t\t\t\t\t</div>\n";
                echo "\t\t\t\t\t<form action=\"" . get_option('siteurl') . "/wp-comments-post.php\" method=\"post\" id=\"commentform\">\n";
                #wp
                thesis_hook_comment_form_top();
                if ($user_ID) {
                    // If the user is logged in... #wp
                    echo "\t\t\t\t\t\t<p>" . sprintf(__('Logged in as <a href="%1$s" rel="nofollow">%2$s</a>.', 'thesis'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity) . ' ' . sprintf(__('<a href="%s" title="Log out of this account" rel="nofollow">Logout &rarr;</a>', 'thesis'), thesis_logout_url()) . "</p>\n";
                } else {
                    // Otherwise, give your name to the doorman
                    $req = (bool) get_option('require_name_email');
                    ?>
						<p><input class="text_input" type="text" name="author" id="author" value="<?php 
                    echo $comment_author;
                    ?>
" tabindex="1"<?php 
                    if ($req) {
                        echo ' aria-required="true"';
                    }
                    ?>
 /><label for="author"><?php 
                    _e('Name', 'thesis');
                    if ($req) {
                        _e(' <span class="required" title="Required">*</span>', 'thesis');
                    }
                    ?>
</label></p>
						<p><input class="text_input" type="text" name="email" id="email" value="<?php 
                    echo $comment_author_email;
                    ?>
" tabindex="2"<?php 
                    if ($req) {
                        echo ' aria-required="true"';
                    }
                    ?>
 /><label for="email"><?php 
                    _e('E-mail', 'thesis');
                    if ($req) {
                        _e(' <span class="required" title="Required">*</span>', 'thesis');
                    }
                    ?>
</label></p>
						<p><input class="text_input" type="text" name="url" id="url" value="<?php 
                    echo $comment_author_url;
                    ?>
" tabindex="3" /><label for="url"><?php 
                    _e('Website', 'thesis');
                    ?>
</label></p>
<?php 
                }
                thesis_hook_comment_field();
                echo "\t\t\t\t\t\t<p class=\"comment_box\">\n";
                echo "\t\t\t\t\t\t\t<textarea name=\"comment\" id=\"comment\" tabindex=\"4\" cols=\"40\" rows=\"8\"></textarea>\n";
                echo "\t\t\t\t\t\t</p>\n";
                thesis_hook_after_comment_box();
                echo "\t\t\t\t\t\t<p class=\"remove_bottom_margin\">\n";
                echo "\t\t\t\t\t\t\t<input name=\"submit\" class=\"form_submit\" type=\"submit\" id=\"submit\" tabindex=\"5\" value=\"" . __('Submit', 'thesis') . "\" />\n";
                comment_id_fields();
                #wp
                echo "\t\t\t\t\t\t</p>\n";
                thesis_hook_comment_form_bottom();
                do_action('comment_form', $post->ID);
                #wp
                echo "\t\t\t\t\t</form>\n";
                echo "\t\t\t\t</div>\n";
            }
        } elseif ($thesis_site->comments['show_closed']) {
            echo "\t\t\t\t<div class=\"comments_closed\">\n";
            echo "\t\t\t\t\t<p>" . apply_filters('thesis_comments_closed', __('Comments on this entry are closed.', 'thesis')) . "</p>\n";
            echo "\t\t\t\t</div>\n";
        }
    }
开发者ID:JGrubb,项目名称:Almond-Tree,代码行数:94,代码来源:comments.php

示例13: digressit_comment_form

/**
 *  This is how the comment form will look
 */
function digressit_comment_form()
{
    global $blog_id;
    ?>
    <a class="hidden-offscreen" href="#commentformend">Skip over comment form.</a>
    <form method="post" action="/" id="add-comment">

        <?php 
    if (!is_user_logged_in()) {
        ?>
            <?php 
        if (function_exists('display_recaptcha')) {
            ?>
                <p><input type="text" class="comment-field-area" id="display_name"  name="author" value="Your Name" ><label for="display_name">Display Name</label><p>
                <p><input type="text" class="comment-field-area" id="user_email" name="email" value="Email"><label for="user_email">Email</label><p>
            <?php 
        } else {
            ?>
                <p><input type="text" class="comment-field-area" id="display_name"  name="display_name" value="Your Name" ><label for="display_name">Display Name</label><p>
                <p><input type="text" class="comment-field-area" id="user_email" name="user_email" value="Email"><label for="user_email">Email</label><p>
            <?php 
        }
        ?>
        <?php 
    }
    ?>
        
        <label for='comment' id="comment-label" class="hidden-offscreen">
            
            <span id="comment-label-comment">
                Enter your comment on the selected section here. If you have not selected a numbered section to comment on, 
                you must do so before commenting. If you have trouble commenting, please <a href="mailto:regulationroom@cornell.edu">email us for technical assistance</a>.
            </span>
    
            <span id="comment-label-reply" style="display: none;">
                Enter your reply to the selected comment here. 
                If you have trouble replying, please <a href="mailto:regulationroom@cornell.edu">email us for technical assistance</a>.
            </span>
                    
        </label>
        <div id="textarea-wrapper" class="wrapper-disabled">
            <div class="left"></div>
            <div class="right">            
            <textarea name="comment" class="comment-textarea comment-collapsed" id="comment"><?php 
    _e('Click here to add a new comment...');
    ?>
</textarea>
            </div>
        </div>
    
        <input name="blog_id" type="hidden"  value="<?php 
    echo $blog_id;
    ?>
" />
        <input name="selected_paragraph_number" type="hidden" id="selected_paragraph_number"  value="0" />
    
        <div id="submit-wrapper" class="wrapper-disabled">
            <?php 
    do_action('secondary_comment_buttons');
    ?>
                <div class="loading-bars"></div><input name="submit" id="submit-comment" class="submit-comment submit ajax disabled" type="button" value="<?php 
    _e('Submit Comment');
    ?>
" disabled="disabled" />
        </div>
        <?php 
    comment_id_fields();
    ?>
        <?php 
    do_action('comment_form', $post->ID);
    ?>
    </form>
    <?php 
    do_action('digressit_after_comment_form');
    ?>
    <?php 
}
开发者ID:angelmoratilla,项目名称:digressit,代码行数:80,代码来源:comments-functions.php

示例14: comment_hidden_fields

 /**
  * Adds hidden comment submission form fields. Alias for comment_id_fields().
  */
 public function comment_hidden_fields()
 {
     comment_id_fields();
 }
开发者ID:evantbyrne,项目名称:trunk,代码行数:7,代码来源:trunk_wp.php

示例15: html

 public function html($args = array())
 {
     global $thesis, $user_ID, $post;
     #wp
     if (!comments_open()) {
         return;
     }
     extract($args = is_array($args) ? $args : array());
     $tab = str_repeat("\t", $depth = !empty($depth) ? $depth : 0);
     $hook = trim($thesis->api->esc(!empty($this->options['hook']) ? $this->options['hook'] : 'comment_form'));
     if (get_option('comment_registration') && !!!$user_ID) {
         #wp
         echo "{$tab}<p class=\"login_alert\">", __('You must log in to post a comment.', 'thesis'), " <a href=\"", wp_login_url(get_permalink()), "\" rel=\"nofollow\">", __('Log in now.', 'thesis'), "</a></p>\n";
     } else {
         do_action("hook_before_{$hook}");
         echo "{$tab}<form id=\"commentform\" method=\"post\" action=\"", site_url('wp-comments-post.php'), "\">\n";
         #wp
         do_action("hook_top_{$hook}");
         $this->rotator(array_merge($args, array('depth' => $depth + 1, 'req' => get_option('require_name_email'))));
         do_action("hook_bottom_{$hook}");
         do_action('comment_form', $post->ID);
         #wp
         comment_id_fields();
         #wp
         echo "{$tab}</form>\n";
         do_action("hook_after_{$hook}");
     }
 }
开发者ID:iaakash,项目名称:chriskeef,代码行数:28,代码来源:boxes.php


注:本文中的comment_id_fields函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。