Sindbad~EG File Manager

Current Path : /var/www/html/wordpress_tahouas/wp-content/themes/newsbt-mobile/
Upload File :
Current File : /var/www/html/wordpress_tahouas/wp-content/themes/newsbt-mobile/comments.php

	<div id="comments" class="comments">
		<?php if (post_password_required()) : ?>
	</div>

	<?php return; endif; ?>

	<?php comment_form(); ?>
	
	<div class="comments-alerts"></div>
	
	<?php
	if (comments_open()) {
		$comment_closed_note = '';
	} else {
		$comment_closed_note = ' comment-closed-note';
	}	
	if (is_singular('post') && have_comments()) :
		if (mwp_option('comments-note') == 1) :
			if (mwp_option('comments-note-text') <> "") { 		
				echo '<div class="comments-note'.$comment_closed_note.'"><p class="alert alert-warning">'. stripslashes(stripslashes(mwp_option('comments-note-text'))) .'</p></div>';
			} else {
				echo '<div class="comments-note'.$comment_closed_note.'"><p class="alert alert-warning">'. __('Type a small note about the comments posted on your site (you can hide this note from comments settings)', MWP_TEXT_DOMAIN) .'</p></div>'; 
			}
		endif;
	endif; 
	?>

	<?php if (have_comments()) : ?>
		<div id="thread" class="comment-list">
			<h2 class="<?php echo mwp_csa_border(); ?> <?php echo mwp_csa_color(); ?>">
				<?php _e( 'Comments', MWP_TEXT_DOMAIN ); ?>
				<span class="hidden"><?php echo ' - '; ?><?php the_title(); ?><?php echo ' : '; ?></span>
				<span><?php comments_number(); ?></span>
			</h2>
			<ul class="commentlist">
				<?php 
				$args = array(
					'type' 			=> 'comment',
					'style' 		=> 'ul',
					'callback' 		=> 'mwp_comment',
					'end-callback' 	=> 'mwp_comment_close'
				);
				wp_list_comments($args);
				?>
			</ul>
		</div>
		<?php
		// Load More Comments
		if ( mwp_option( 'single-comments-ajax') == 1 && mwp_option( 'single-comments-type') == 2 ) {
			if ( get_option('page_comments') == true ) { 
				$wpcount_comments = wp_count_comments($post->ID);  
				$comment_per_page = get_option('comments_per_page');
				$comment_count = get_comments_number($post->ID);
				if ( $wpcount_comments->approved  > $comment_per_page ) { 
					?>
						<div class="wrap-load">
							<div class="post-load"><?php _e( 'load more comments', MWP_TEXT_DOMAIN ); ?><span class="spinner"></span></div>
						</div>
						<script>
						jQuery(document).ready(function($) {
							comments_per_page = <?php echo get_option('comments_per_page'); ?>;
							cpaged = 1;
							total_comment = <?php echo $comment_count; ?>;
							$('body').on("click", ".post-load", function() {
								if (!jQuery(this).hasClass("no-posts")) {
									var postid   = '<?php global $post; echo $post->ID; ?>';
									$('.spinner').css('display', 'inline-block');
									$.ajax({
										type: "GET",
										url: "<?php echo MWP_AJAX_ENDPOINT; ?>",
										dataType: 'html',
										data: ({ action: 'load_more_comments', cpaged: cpaged, postid: postid}),
										success: function(data){
											if ( $(data).find( ".commentlist" ).children().appendTo('.commentlist').length ) {
												$(".post-load").html('<?php _e( 'load more comments', MWP_TEXT_DOMAIN ); ?><span class="spinner"></span>');
											} else {
												$(".post-load").html('<?php _e( 'No more comments', MWP_TEXT_DOMAIN ); ?><span class="spinner"></span>');
												$(".post-load").addClass('no-posts');
											}
											$(data).find( ".commentlist" ).children().appendTo('.commentlist');
											jQuery(window).trigger('resize');
											comments_per_page = comments_per_page + <?php echo get_option('comments_per_page'); ?>;
											<?php if (mwp_option('lazyload-enable') == '1') { ?>
											jQuery(window).lazyLoadXT();
											<?php } ?>
											cpaged = cpaged + 1;
										}
									}).always(function(){
										$('.spinner').hide();
									});
								}
							});
						});
						</script>
					<?php 
				} 
			} 
		} 
		// Comments Page navigation
		else {
			if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { 
					?>
					<div class="comments-nav">
						<?php _e( 'Pages : ', MWP_TEXT_DOMAIN ); ?><?php if(function_exists('mwp_commentnavi')) { mwp_commentnavi(); } ?>
					</div><!-- comments-nav -->
					<?php 
				}
				
		} ?>

	<?php elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
		<div class="comment-closed">
			<p><?php _e( 'Sorry Comments are closed', MWP_TEXT_DOMAIN ); ?></p>
		</div>
	<?php endif; ?>
</div>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists