fix(ns): root-qualify WP_* classes after PSR-4 move

Bare WP_REST_Server etc. resolve under AKSRT\* namespaces; prefix with
\ for Balance REST and other type hints / constructors.
This commit is contained in:
kate522 committed 2026-07-17 15:12:14 +08:00
1 parent d3107a449b
commit 1e21911b03
9 files changed
+27 -27

No files matched your search

+2 -2
View File
@@ -109,7 +109,7 @@ class CommentService {
/**
* Render forum comments HTML for AJAX and initial load.
*
* @param WP_Comment[] $comments Comments (parents + children mixed).
* @param \WP_Comment[] $comments Comments (parents + children mixed).
* @param int $topic_id Topic post ID.
* @param int $adopted_id Adopted comment ID (0 if none).
*/
@@ -366,7 +366,7 @@ class CommentService {
* @param bool $author_only Only show post-author replies.
* @param int $page Page number.
* @param int $per_page Items per page.
* @return array{comments:WP_Comment[],total:int,max_pages:int,page:int,adopted_id:int}
* @return array{comments:\WP_Comment[],total:int,max_pages:int,page:int,adopted_id:int}
*/
public function get_forum_comments(int $topic_id, string $sort = 'newest', bool $author_only = false, int $page = 1, int $per_page = 30): array {
$post = get_post($topic_id);