Make WordPress Core

Ticket #23851: 23851.3.diff

File 23851.3.diff, 1.8 KB (added by chrisvanpatten, 11 years ago)

This is a patch I prepared for #24626 that lets you specify class_form, like you can specify class_id now. It needs to be modified slightly now to include a default class to be compatible with the modified 2013 stylesheet in 23851.2 and probably should support changing the h3 and submit button classes too.

  • wp-includes/comment-template.php

     
    16291629                '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>',
    16301630                'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
    16311631                '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>',
     1632                'class_form'           => '',
    16321633                'id_form'              => 'commentform',
    16331634                'id_submit'            => 'submit',
    16341635                'title_reply'          => __( 'Leave a Reply' ),
     
    16491650                                        <?php echo $args['must_log_in']; ?>
    16501651                                        <?php do_action( 'comment_form_must_log_in_after' ); ?>
    16511652                                <?php else : ?>
    1652                                         <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>>
     1653                                        <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post"<?php echo ( $args['class_form'] ? ' class="' . esc_attr( $args['class_form'] ) . '"' : '' ); ?> id="<?php echo esc_attr( $args['id_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>>
    16531654                                                <?php do_action( 'comment_form_top' ); ?>
    16541655                                                <?php if ( is_user_logged_in() ) : ?>
    16551656                                                        <?php echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity ); ?>