Skip to:
Content

BuddyPress.org

Ticket #3247: #3247-add-fields-to-coment-form.patch

File #3247-add-fields-to-coment-form.patch, 1.2 KB (added by hnla, 15 years ago)

Add allowed tags & 'email will not be pub...' fields to comment form

  • bp-themes/bp-default/comments.php

     
    11<?php
     2// comment_form() args
     3
     4  $fields = array(
     5                                'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf( __( 'You may use these <abbr title="HyperText Markup
     6                                Language">HTML</abbr> tags and attributes: %s' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>',
     7                                // if non logged in comments are allowed 'email not published' shown.
     8                                'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>'
     9                                );
     10                               
    211        if ( post_password_required() ) {
    312                echo '<h3 class="comments-header">' . __( 'Password Protected', 'buddypress' ) . '</h3>';
    413                echo '<p class="alert password-protected">' . __( 'Enter the password to view comments.', 'buddypress' ) . '</p>';
     
    5463<?php endif; ?>
    5564
    5665<?php if ( comments_open() ) : ?>
    57         <?php comment_form() ?>
     66        <?php comment_form( $fields ) ?>
    5867<?php endif; ?>
    5968
    6069<?php if ( !empty( $num_trackbacks ) ) : ?>