updated comments

This commit is contained in:
2026-03-11 20:23:28 +01:00
parent c7b5d52197
commit 7f253bc452
4 changed files with 215 additions and 14 deletions

View File

@@ -14,7 +14,7 @@
<div class="pexpo-core-root pexpo-core-shell" id="pexpo-core-comments-shell">
<div class="pexpo-core-comments" id="pexpo-core-comments">
<div class="pexpo-core-comments-header">
<h2 class="pexpo-core-comments-title"><?php echo esc_html__('Hozzászólások', 'partnerexpo-core'); ?></h2>
<h2 class="pexpo-core-comments-title"><?php echo esc_html__('Visszajelzések', 'partnerexpo-core'); ?></h2>
</div>
<div class="pexpo-core-comments-body" id="pexpo-core-comments-body">
<?php
@@ -22,20 +22,36 @@
'post_id' => get_the_ID(),
'status' => 'approve',
]);
if ( ! empty( $comments ) ) {
foreach ( $comments as $comment ) {
?>
echo '<div class="pexpo-core-comment-groups-wrapper">';
for ($i = 0; $i < 2; $i++) {
echo '<div class="pexpo-core-comment-group"'.($i ? ' aria-hidden="true"' : '').'>';
foreach ($comments as $comment) {
?>
<div class="pexpo-core-comment">
<div class="pexpo-core-comment-author">
<?php echo get_comment_meta( $comment, 'company', true ); ?>
</div>
<div class="pexpo-core-comment-content">
<?php echo get_comment_text( $comment ); ?>
</div>
<div class="pexpo-core-comment-said_by">
<?php if ( get_comment_meta( $comment->comment_ID, 'name', true ) ): ?>
<div class="pexpo-core-comment-author">
<p><?php echo get_comment_meta( $comment->comment_ID, 'name', true ); ?></p>
</div>
<p>-</p>
<?php endif; ?>
<div class="pexpo-core-comment-business">
<p><?php echo get_comment_meta( $comment->comment_ID, 'company', true ); ?></p>
</div>
</div>
</div>
<?php
<?php
}
echo '</div>';
}
echo '</div>';
} else {
?>
<p class="pexpo-core-no-comments"><?php echo esc_html__('Még nincsenek hozzászólások.', 'partnerexpo-core'); ?></p>
@@ -45,16 +61,21 @@
</div>
<?php
$comments_args = array(
'label_submit' => __( 'Send', 'partnerexpo-core' ),
'title_reply' => __( 'Write a Reply or Comment', 'partnerexpo-core' ),
'label_submit' => __( 'Küldés', 'partnerexpo-core' ),
'title_reply' => '',
'comment_notes_after' => '',
'must_log_in' => '',
'logged_in_as' => '',
'comment_field' => '
<p class="comment-form-comment"><label for="company">' . _x( 'Company', 'partnerexpo_core' ) . '</label><br />
<input type="text" id="company" name="company" aria-required="true"></textarea></p>
<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'partnerexpo_core' ) . '</label><br />
<textarea id="comment" name="comment" aria-required="true"></textarea></p>
<div class="pexpo-core-com-form-wrapper">
<h2 class="pexpo-core-com-form-title">' . _x( 'Visszajelzés küldése', 'partnerexpo_core' ) . '</h2>
<p class="pexpo-core-com-field"><label for="name">' . _x( 'Kitöltő neve', 'partnerexpo_core' ) . '</label><br />
<input type="text" id="name" name="name" aria-required="true"></p>
<p class="pexpo-core-com-field"><label for="company">' . _x( 'Cég név', 'partnerexpo_core' ) . '</label><br />
<input type="text" id="company" name="company" aria-required="true"></p>
<p class="pexpo-core-com-field"><label for="comment">' . _x( 'Hozzászólás', 'partnerexpo_core' ) . '</label><br />
<textarea id="comment" name="comment" aria-required="true" maxlength="600"></textarea></p>
</div>
',
);
comment_form( $comments_args );