helper->getCurrentUser(); do_action("wpdiscuz_before_load", $post, $currentUser); $load = apply_filters("wpdiscuz_load_template", true, $currentUser, $post); if (!post_password_required($post->ID) && $load) { $commentsCount = (int)get_comments_number(); $filtersVisibilityClass = $commentsCount === 0 ? 'wpdiscuz-hidden' : ''; $wpCommClasses = []; $wpCommClasses[] = $currentUser && $currentUser->ID ? "wpdiscuz_auth" : "wpdiscuz_unauth"; $wpCommClasses[] = $wpdiscuz->options->thread_styles["theme"]; if (!$wpdiscuz->options->thread_layouts["showAvatars"] || !$wpdiscuz->options->wp["showAvatars"]) { $wpCommClasses[] = "wpdiscuz_no_avatar"; } ?>
wpdiscuzForm->getForm($post->ID); $wpCommClasses[] = "wpd-layout-" . $form->getLayout(); $commentsOpen = comments_open($post); $wpCommClasses[] = $commentsOpen ? "wpd-comments-open" : "wpd-comments-closed"; $wpCommClasses = apply_filters("wpdiscuz_container_classes", $wpCommClasses); $wpCommClasses = implode(" ", $wpCommClasses); $currentUserId = 0; $currentUserEmail = isset($_COOKIE["comment_author_email_" . COOKIEHASH]) ? sanitize_email($_COOKIE["comment_author_email_" . COOKIEHASH]) : ""; if ($currentUser && $currentUser->ID) { $currentUserId = $currentUser->ID; $currentUserEmail = $currentUser->user_email; } $isShowSubscribeBar = $form->isShowSubscriptionBar() && WpdiscuzHelper::isUserCanFollowOrSubscribe($currentUserEmail); $isPostmaticActive = !class_exists("Prompt_Comment_Form_Handling") || (class_exists("Prompt_Comment_Form_Handling") && !$wpdiscuz->options->subscription["usePostmaticForCommentNotification"]); $wpdiscuz->helper->superSocializerFix(); if ($commentsOpen) { if ($formCustomCss = $form->getCustomCSS()) { echo ""; } } else { do_action("comment_form_closed"); do_action("wpdiscuz_comment_form_closed", $post, $currentUser, $commentsCount); } do_action("wpdiscuz_comment_form_before"); ?>