Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-content/plugins/reviewx/app/CPT/CptCommentsLinkMeta.php
Назад
<?php namespace Rvx\CPT; use Rvx\CPT\CptHelper; class CptCommentsLinkMeta { protected $cptHelper; public function __construct() { $this->cptHelper = new CptHelper(); } /** * Modify the comment count output with custom review logic */ public function replace_total_comments_count($count, $post_id) { // List of post types to target $enabled_post_types = $this->cptHelper->enabledCPT(); unset($enabled_post_types['product']); // Unset Product $post_type = get_post_type($post_id); // Exclude post type if (!isset($enabled_post_types[$post_type])) { return $count; // No changes } $reviewCount = (new \Rvx\CPT\CptReviewsCount())->newCount($post_id); if (!empty($reviewCount[0]) && $reviewCount[0] > 0) { // Return the filtered review count without replies return $reviewCount[0]; } else { return $count; } } }
| ver. 1.6 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка