0) { $this->render_suggestion_detail($current_suggestion); } else { $this->render_suggestions_interface(); } return ob_get_clean(); } private function render_suggestion_detail($suggestion_id) { $suggestion = PC_Community_Suggestions_Database::get_suggestion_by_id($suggestion_id); $comments = $suggestion ? PC_Community_Suggestions_Database::get_comments($suggestion_id) : array(); if (!$suggestion) { echo '
'; echo '

' . esc_html__('Suggestion not found.', 'pc-community-suggestions-7d3f') . '

'; echo '' . esc_html__('Back to Suggestions', 'pc-community-suggestions-7d3f') . ''; echo '
'; return; } ?>
render_suggestion_card($suggestion, true); ?>

display_name ?: $comment->user_login); ?> created_at)); ?>
comment)); ?>

render_suggestion_card($suggestion); ?>
1) : ?>
get_pagenum_link(1) . '%_%', 'format' => 'page/%#%/', 'current' => $current_page, 'total' => $total_pages, 'prev_text' => __('« Previous', 'pc-community-suggestions-7d3f'), 'next_text' => __('Next »', 'pc-community-suggestions-7d3f'), 'add_args' => array('sort' => $sort) )); ?>
id, get_current_user_id()) : false; $vote_class = $user_has_voted ? 'pc-voted' : ''; if ($detail_view) { $vote_button_html = ''; } else { $vote_button_html = 'onclick="pcVoteSuggestion(' . esc_attr($suggestion->id) . ')"'; } ?>
upvotes); ?>

title); ?> title); ?>

content)); } else { echo wp_kses_post(wpautop(wp_trim_words($suggestion->content, 30, '...'))); } ?>
display_name ?: $suggestion->user_login) ); ?> created_at), current_time('timestamp')) . ' ' . __('ago', 'pc-community-suggestions-7d3f'); ?>