darshan_saroya

comments.php

Mar 11th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.59 KB | None | 0 0
  1. <?php if ( post_password_required() ) : ?>
  2.     <?php _e( 'This post is password protected. Enter the password to view any comments.', 'weblizar' ); ?></p>
  3.     <?php return; endif; ?>
  4.          <?php if ( have_comments() ) : ?>
  5.     <div class="enigma_comment_section">       
  6.     <div class="enigma_comment_title"><h3><i class="fa fa-comments"></i><?php echo comments_number('Keine Kommentare', '1 Comment', '% Comments'); ?></h3></div>
  7.    
  8.     <?php wp_list_comments( array( 'callback' => 'weblizar_comment' ) ); ?>
  9.     <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
  10.         <nav id="comment-nav-below">
  11.             <h1 class="assistive-text"><?php _e( 'Comment navigation', 'weblizar' ); ?></h1>
  12.             <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'weblizar' ) ); ?></div>
  13.             <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'weblizar' ) ); ?></div>
  14.         </nav>
  15.     <?php endif;  ?>
  16.     </div>     
  17.     <?php endif; ?>
  18. <?php if ( comments_open() ) : ?>
  19.     <div class="enigma_comment_form_section">
  20.    
  21.                            
  22.     <?php  
  23.      $fields=array(
  24.         'author' => '<div class="enigma_form_group"><label for="exampleInputEmail1">Name<small>*</small></label><input name="author" id="name" type="text" id="exampleInputEmail1" class="enigma_con_input_control"></div>',
  25.         'email' => '<div class="enigma_form_group"><label for="exampleInputPassword1">Email<small>*</small></label><input  name="email" id="email" type="text" class="enigma_con_input_control"></div>',
  26.        
  27.         );
  28.     function my_fields($fields) {
  29.         return $fields;
  30.     }
  31.     add_filter('comment_form_default_fields','my_fields');
  32.         $defaults = array(
  33.         'fields'=> apply_filters( 'comment_form_default_fields', $fields ),
  34.         'comment_field'=> '<div class="enigma_form_group"><label for="message"> Message *</label>
  35.         <textarea id="comment" name="comment" class="enigma_con_textarea_control" rows="5"></textarea></div>',     
  36.         'logged_in_as' => '<p class="logged-in-as">' . __( "Logged in as ",'weblizar' ).'<a href="'. admin_url( 'profile.php' ).'">'.$user_identity.'</a>'. '<a href="'. wp_logout_url( get_permalink() ).'" title="Log out of this account">'.__(" Log out?",'weblizar').'</a>' . '</p>',
  37.         'title_reply_to' => __( 'Antwort verlassen %s','weblizar'),
  38.         'id_submit' => 'enigma_send_button',
  39.         'label_submit'=>__( 'Kommentar senden','weblizar'),
  40.         'comment_notes_before'=> '',
  41.         'comment_notes_after'=>'',
  42.         'title_reply'=> '<h2>'.__('Antwort verlassen','weblizar').'</h2>',     
  43.         'role_form'=> 'form',      
  44.         );
  45.         comment_form($defaults); ?>    
  46.        
  47. </div>
  48. <?php endif; // If registration required and not logged in ?>
  49. <?php //endif;  ?>
Add Comment
Please, Sign In to add comment