rest_comment_collection_params

過濾鉤子
apply_filters( 'rest_comment_collection_params', $query_params )

rest_comment_collection_params – 這個鉤子用來過濾通過WordPress REST API檢索評論集合時接受的引數。開發人員可以使用這個鉤子從接受的引數列表中新增或刪除引數。

為註釋控制器過濾REST API集合引數。

此篩選器註冊集合引數,但不將集合引數對映到內部WP_Comment_Query引數。使用rest_comment_query過濾器設定WP_Comment_Query引數。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'rest_comment_collection_params', $query_params );
return apply_filters( 'rest_comment_collection_params', $query_params );
return apply_filters( 'rest_comment_collection_params', $query_params );

常見問題

FAQs
檢視更多 >