Guest User

Untitled

a guest
Apr 15th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. <?php if ( post_password_required() ) : ?>
  2. <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'rambo' ); ?>
  3. </p>
  4. <?php return;endif;?>
  5. <?php if ( have_comments() ) : ?>
  6. <div class="row-fluid comment_mn">
  7. <div class="blog_single_post_head_title">
  8. <h3><?php _e('Comments','rambo');?></h3>
  9. </div>
  10.  
  11. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
  12.  
  13. <nav id="comment-nav-above">
  14. <h1 class="assistive-text"><?php _e( 'Comment navigation', 'rambo' ); ?></h1>
  15. <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'rambo' ) ); ?></div>
  16. <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'rambo' ) ); ?></div>
  17. </nav>
  18. <?php endif; ?>
  19.  
  20. <?php wp_list_comments( array( 'callback' => 'rambo_comment' ) ); ?>
  21. </div><!-- comment_mn -->
  22.  
  23. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
  24. <nav id="comment-nav-below">
  25. <h1 class="assistive-text"><?php _e( 'Comment navigation', 'rambo' ); ?></h1>
  26. <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'rambo' ) ); ?></div>
  27. <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'rambo' ) ); ?></div>
  28. </nav>
  29. <?php endif; ?>
  30. <?php elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
  31.  
  32. <?php endif; ?>
  33. <?php if ('open' == $post->comment_status) : ?>
  34. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  35. <p><?php _e("You must be",'rambo')?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e("logged in",'rambo')?></a> <?php _e("to post a comment",'rambo')?>
  36. </p>
  37. <?php else : ?>
  38.  
  39. <div class="row-fluid comment_section">
  40.  
  41. <?php
  42. $fields=array(
  43. 'author' => '<lable>Name</lable><span>*<span><br/>
  44. <input class="span9 leave_comment_field" name="author" id="author" type="text"/><br/>',
  45. 'email' => '<lable>Email</lable><br/><input class="" name="email" id="email" type="text" ><br/>',
  46. 'website'=> '<lable>Website</lable><br/><input class="span9 leave_comment_field" name="website" id="website" type="text" ><br/><br/>',
  47. );
  48.  
  49. function my_fields($fields) {
  50.  
  51. return $fields;
  52. }
  53. add_filter('comment_form_default_fields','my_fields');
  54.  
  55. $defaults = array(
  56. 'fields' => apply_filters( 'comment_form_default_fields', $fields ),
  57. 'comment_field' => '<label>Comment<span>*</span></label>
  58. <textarea id="comments" rows="7" class="span12 leave_comment_field" name="comment" type="text"></textarea>',
  59. 'logged_in_as' => '<p class="logged-in-as">' . __( "Logged in as ",'rambo' ).'<a href="'. admin_url( 'profile.php' ).'">'.$user_identity.'</a>'. '<a href="'. wp_logout_url( get_permalink() ).'" title="Log out of this account">'.__(" Log out?",'rambo').'</a>' . '</p>',
  60. 'id_submit' => 'comment_btn',
  61. 'label_submit' =>__( 'Post Comment','rambo'),
  62. 'comment_notes_after' => '',
  63. 'title_reply' => '<div class="blog_single_post_head_title"><h3>'.__( 'Leave a Comment','rambo').'</h3></div>',
  64. 'id_form' => 'action'
  65. );
  66. comment_form($defaults);?>
  67.  
  68. </div><!-- leave_comment_mn -->
  69.  
  70. <?php endif; // If registration required and not logged in ?>
  71.  
  72. <?php endif; ?>
Add Comment
Please, Sign In to add comment