HEX
Server: Apache
System: Linux 95-217-38-122.cprapid.com 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 30 09:45:56 EDT 2024 x86_64
User: targetplatform (1004)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /mnt/data/targetplatform/www/ku/wp-content/themes/publisher/comments-ajaxified.php
<?php
/**
 * comments-ajaxified.php
 *
 * The template for displaying ajaxified comments.
 *
 * Content of each comment will be output with the type of comment.
 * You can view and/or edit the comment file in "views/general/comments"
 *
 * @author    BetterStudio
 * @package   Publisher
 * @version   7.9
 */

/* If a post password is required or comments is close, return. */
if ( post_password_required() || ! comments_open() ) {
	return;
}

?>
<?php
if ( ! empty( $_REQUEST['action'] ) && ! empty( $_REQUEST['post_ID'] ) && 'ajax-get-post' === $_REQUEST['action'] ) {
	$html =
		'<div id="ajaxified-comments">
			<div id="respond" class="ajaxified-respond">';

	echo $html;
}
?>
	<section class="comments-template ajaxified-comments-container">
		<a href="#" class="comment-ajaxified-placeholder" data-comment-post-id="<?php the_ID() ?>">
			<i class="fa fa-comments"></i> <?php

			// Comments Number
			$num_comments = get_comments_number();

			if ( $num_comments <= 0 ) {
				publisher_translation_echo( 'comment_show_comment' );
			} else {
				printf( publisher_translation_get( 'comment_show_comments' ), $num_comments );
			}

			?>
		</a>
	</section>

<?php
if ( ! empty( $_REQUEST['action'] ) && ! empty( $_REQUEST['post_ID'] ) && 'ajax-get-post' === $_REQUEST['action'] ) {
	$html =
		'</div>
			</div>';

	echo $html;
}
?>