Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( comments_open( $post_id ) ) : ?>
- <?php do_action( 'comment_form_before' ); ?>
- <div id="respond">
- <h3 id="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() ) : ?>
- add_filter( 'comment_form_defaults', 'custom_reply_title' );
- function custom_reply_title( $defaults ){
- $defaults['title_reply_before'] = '<span id="reply-title" class="h4 comment-reply-title">';
- $defaults['title_reply_after'] = '</span>';
- return $defaults;
- }
- h4, .h4 {
- /* styles */
- }
- function my_comment_form_before() {
- ob_start();
- }
- add_action( 'comment_form_before', 'my_comment_form_before' );
- function my_comment_form_after() {
- $html = ob_get_clean();
- $html = preg_replace(
- '/<h3 id="reply-title"(.*)>(.*)</h3>/',
- '<p id="reply-title"1>2</p>',
- $html
- );
- echo $html;
- }
- add_action( 'comment_form_after', 'my_comment_form_after' );
- add_filter( 'comment_author_says_text', 'sp_comment_author_says_text' );
- function sp_comment_author_says_text() {
- return 'author says';
- }
- add_filter( 'comment_form_defaults', 'sp_comment_form_defaults' );
- function sp_comment_form_defaults( $defaults ) {
- $defaults['title_reply'] = __( 'Leave a Comment' );
- return $defaults;
- }
Add Comment
Please, Sign In to add comment