WordPress.org

Make WordPress Core

Changeset 14268


Ignore:
Timestamp:
04/28/10 04:28:51 (5 years ago)
Author:
nacin
Message:

Add full HTML filter to comment_form(), along with an echo arg. props joostdevalk, fixes #12564.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r14195 r14268  
    15161516        'cancel_reply_link'    => __( 'Cancel reply' ), 
    15171517        'label_submit'         => __( 'Post Comment' ), 
     1518        'echo'                 => true, 
    15181519    ); 
    15191520 
    15201521    $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); 
    1521  
     1522    ob_start(); 
    15221523    ?> 
    15231524        <?php if ( comments_open() ) : ?> 
     
    15571558        <?php else : ?> 
    15581559            <?php do_action( 'comment_form_comments_closed' ); ?> 
    1559         <?php endif; ?> 
    1560     <?php 
     1560        <?php endif; 
     1561    $form = apply_filters( 'comment_form_output', ob_get_clean(), $args ); 
     1562    if ( $args['echo'] ) 
     1563        echo $form; 
     1564    else 
     1565        return $form; 
    15611566} 
    15621567 
Note: See TracChangeset for help on using the changeset viewer.