Opened 4 years ago
Last modified 2 years ago
#55922 new enhancement
Update wp_list_comments type parameter to allow array or string
| Reported by: | dshanske | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Comments | Version: | 2.7 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Right now, the options here are all, or a specific comment type. This should allow for multiple comment types as allowed in WP_Comment_Query
Change History (1)
This ticket was mentioned in PR #7054 on WordPress/wordpress-develop by @debarghyabanerjee.
2 years ago
#1
- Keywords has-patch added; needs-patch removed
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac Ticket: Core-55922
## Problem
## Solution
## Changes Made
Code Enhancement: Updated the wp_list_comments function to accept both arrays and strings for the type parameter.Backend Implementation: Enhanced comment query handling to accommodate arrays and strings passed to the type parameter.## Impact
Enhanced Flexibility: Developers can now specify comment types using either an array of types or a single type string in the wp_list_comments function.Improved Query Capabilities: Facilitates querying multiple comment types simultaneously, leveraging the capabilities of WP_Comment_Query.Expanded Usage Scenarios: Supports a wider range of use cases where querying comments from multiple types is required within a single function call.Backward Compatibility: Ensures compatibility with existing usage of the wp_list_comments function by retaining support for single type string parameter.