Revert [14268] - It is much better to use JavaScript for this kind of enhancement. Output buffering is too fragile. See #12564.

git-svn-id: https://develop.svn.wordpress.org/trunk@14274 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-04-28 07:17:20 +00:00
parent a3d0926168
commit 5dd4da6932
1 changed files with 3 additions and 8 deletions

View File

@ -1515,11 +1515,10 @@ function comment_form( $args = array(), $post_id = null ) {
'title_reply_to' => __( 'Leave a Reply to %s' ),
'cancel_reply_link' => __( 'Cancel reply' ),
'label_submit' => __( 'Post Comment' ),
'echo' => true,
);
$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
ob_start();
?>
<?php if ( comments_open() ) : ?>
<?php do_action( 'comment_form_before' ); ?>
@ -1557,12 +1556,8 @@ function comment_form( $args = array(), $post_id = null ) {
<?php do_action( 'comment_form_after' ); ?>
<?php else : ?>
<?php do_action( 'comment_form_comments_closed' ); ?>
<?php endif;
$form = apply_filters( 'comment_form_output', ob_get_clean(), $args );
if ( $args['echo'] )
echo $form;
else
return $form;
<?php endif; ?>
<?php
}
?>